diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-04 14:14:22 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-04 14:14:22 +0000 |
commit | 71a6c83a55c21a9ac345f6ee69cbeb6484da43e5 (patch) | |
tree | c19c28f3244ec7bc3348ad16ec23daf484355666 /spec/models | |
parent | f7e7e40daf335570747b6f8893a63f1e9c91657a (diff) | |
parent | ec35a9e8609c3e110e025629f5058433ce06b123 (diff) | |
download | gitlab-ce-71a6c83a55c21a9ac345f6ee69cbeb6484da43e5.tar.gz |
Merge branch 'gitaly-clean-up-tests' into 'master'
Clean up Gitaly tests
See merge request !12526
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/environment_spec.rb | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index b0635c6a90a..0a2cd8c2957 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -120,28 +120,17 @@ describe Environment, models: true do let(:head_commit) { project.commit } let(:commit) { project.commit.parent } - context 'Gitaly find_ref_name feature disabled' do - it 'returns deployment id for the environment' do - expect(environment.first_deployment_for(commit)).to eq deployment1 - end + it 'returns deployment id for the environment' do + expect(environment.first_deployment_for(commit)).to eq deployment1 + end - it 'return nil when no deployment is found' do - expect(environment.first_deployment_for(head_commit)).to eq nil - end + it 'return nil when no deployment is found' do + expect(environment.first_deployment_for(head_commit)).to eq nil end - # TODO: Uncomment when feature is reenabled - # context 'Gitaly find_ref_name feature enabled' do - # before do - # allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(:find_ref_name).and_return(true) - # end - # - # it 'calls GitalyClient' do - # expect_any_instance_of(Gitlab::GitalyClient::Ref).to receive(:find_ref_name) - # - # environment.first_deployment_for(commit) - # end - # end + it 'returns a UTF-8 ref' do + expect(environment.first_deployment_for(commit).ref).to be_utf8 + end end describe '#environment_type' do |