Use active tense, feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12501303
This commit is contained in:
parent
314befded7
commit
8a0aeab846
1 changed files with 9 additions and 9 deletions
|
@ -20,17 +20,17 @@ describe Ci::Runner, models: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#display_name' do
|
describe '#display_name' do
|
||||||
it 'should return the description if it has a value' do
|
it 'returns the description if it has a value' do
|
||||||
runner = FactoryGirl.build(:ci_runner, description: 'Linux/Ruby-1.9.3-p448')
|
runner = FactoryGirl.build(:ci_runner, description: 'Linux/Ruby-1.9.3-p448')
|
||||||
expect(runner.display_name).to eq 'Linux/Ruby-1.9.3-p448'
|
expect(runner.display_name).to eq 'Linux/Ruby-1.9.3-p448'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return the token if it does not have a description' do
|
it 'returns the token if it does not have a description' do
|
||||||
runner = FactoryGirl.create(:ci_runner)
|
runner = FactoryGirl.create(:ci_runner)
|
||||||
expect(runner.display_name).to eq runner.description
|
expect(runner.display_name).to eq runner.description
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return the token if the description is an empty string' do
|
it 'returns the token if the description is an empty string' do
|
||||||
runner = FactoryGirl.build(:ci_runner, description: '', token: 'token')
|
runner = FactoryGirl.build(:ci_runner, description: '', token: 'token')
|
||||||
expect(runner.display_name).to eq runner.token
|
expect(runner.display_name).to eq runner.token
|
||||||
end
|
end
|
||||||
|
@ -277,13 +277,13 @@ describe Ci::Runner, models: true do
|
||||||
runner.update(is_shared: true)
|
runner.update(is_shared: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'should not give owned runner' do
|
context 'does not give owned runner' do
|
||||||
subject { Ci::Runner.available_for(project) }
|
subject { Ci::Runner.available_for(project) }
|
||||||
|
|
||||||
it { is_expected.to be_empty }
|
it { is_expected.to be_empty }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'should not give shared runner' do
|
context 'does not give shared runner' do
|
||||||
subject { Ci::Runner.available_for(another_project) }
|
subject { Ci::Runner.available_for(another_project) }
|
||||||
|
|
||||||
it { is_expected.to be_empty }
|
it { is_expected.to be_empty }
|
||||||
|
@ -291,13 +291,13 @@ describe Ci::Runner, models: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with unlocked runner' do
|
context 'with unlocked runner' do
|
||||||
context 'should not give owned runner' do
|
context 'does not give owned runner' do
|
||||||
subject { Ci::Runner.available_for(project) }
|
subject { Ci::Runner.available_for(project) }
|
||||||
|
|
||||||
it { is_expected.to be_empty }
|
it { is_expected.to be_empty }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'should give a specific runner' do
|
context 'does give a specific runner' do
|
||||||
subject { Ci::Runner.available_for(another_project) }
|
subject { Ci::Runner.available_for(another_project) }
|
||||||
|
|
||||||
it { is_expected.to contain_exactly(runner) }
|
it { is_expected.to contain_exactly(runner) }
|
||||||
|
@ -309,13 +309,13 @@ describe Ci::Runner, models: true do
|
||||||
runner.update(locked: true)
|
runner.update(locked: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'should not give owned runner' do
|
context 'does not give owned runner' do
|
||||||
subject { Ci::Runner.available_for(project) }
|
subject { Ci::Runner.available_for(project) }
|
||||||
|
|
||||||
it { is_expected.to be_empty }
|
it { is_expected.to be_empty }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'should not give a locked runner' do
|
context 'does not give a locked runner' do
|
||||||
subject { Ci::Runner.available_for(another_project) }
|
subject { Ci::Runner.available_for(another_project) }
|
||||||
|
|
||||||
it { is_expected.to be_empty }
|
it { is_expected.to be_empty }
|
||||||
|
|
Loading…
Reference in a new issue