314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksarequire 'spec_helper'
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa shared_examples 'symlink_creation' do |category|
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa let(:link_path) { repository.symlink_path(category) }
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa expect(link_target).to eq(repository.local_path.to_s)
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa expect(repository.symlink_path(category).exist?).to be(false)
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa include_examples('symlink_creation', :git_daemon)
c18eca06bdaab35372205f3ed1779cabc5897709Eugen Kuksa expect(repository.symlink_path(:git_daemon).exist?).to be(false)
c18eca06bdaab35372205f3ed1779cabc5897709Eugen Kuksa expect(repository.symlink_path(:git_ssh).exist?).to be(true)
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa let(:repository) { create :repository, access: 'private_rw' }
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa let(:link_path) { repository.symlink_path(category) }
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa expect(repository.symlink_path(category).exist?).to be(false)
c18eca06bdaab35372205f3ed1779cabc5897709Eugen Kuksa expect(repository.symlink_path(category).exist?).to be(true)
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa expect(repository.symlink_path(category).exist?).to be(false)
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa let(:link_path) { repository.symlink_path(category) }
314227c349d7c3a2aec4b39e11d6770b3db8a652Eugen Kuksa expect(link_target).to eq(repository.local_path.to_s)