Commit ba88a47e authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '46010-add-missing-parens' into 'master'

Add missing parens to make consistent in project_spec and runner_spec

See merge request gitlab-org/gitlab-ce!18808
parents 09747ecd 11a5971b
...@@ -198,7 +198,7 @@ describe Ci::Runner do ...@@ -198,7 +198,7 @@ describe Ci::Runner do
end end
describe '#assign_to' do describe '#assign_to' do
let!(:project) { FactoryBot.create :project } let!(:project) { FactoryBot.create(:project) }
let!(:shared_runner) { FactoryBot.create(:ci_runner, :shared) } let!(:shared_runner) { FactoryBot.create(:ci_runner, :shared) }
before do before do
......
...@@ -309,12 +309,12 @@ describe Project do ...@@ -309,12 +309,12 @@ describe Project do
describe 'project token' do describe 'project token' do
it 'sets an random token if none provided' do it 'sets an random token if none provided' do
project = FactoryBot.create :project, runners_token: '' project = FactoryBot.create(:project, runners_token: '')
expect(project.runners_token).not_to eq('') expect(project.runners_token).not_to eq('')
end end
it 'does not set an random token if one provided' do it 'does not set an random token if one provided' do
project = FactoryBot.create :project, runners_token: 'my-token' project = FactoryBot.create(:project, runners_token: 'my-token')
expect(project.runners_token).to eq('my-token') expect(project.runners_token).to eq('my-token')
end end
end end
...@@ -639,7 +639,7 @@ describe Project do ...@@ -639,7 +639,7 @@ describe Project do
describe '#to_param' do describe '#to_param' do
context 'with namespace' do context 'with namespace' do
before do before do
@group = create :group, name: 'gitlab' @group = create(:group, name: 'gitlab')
@project = create(:project, name: 'gitlabhq', namespace: @group) @project = create(:project, name: 'gitlabhq', namespace: @group)
end end
...@@ -866,8 +866,8 @@ describe Project do ...@@ -866,8 +866,8 @@ describe Project do
describe '#star_count' do describe '#star_count' do
it 'counts stars from multiple users' do it 'counts stars from multiple users' do
user1 = create :user user1 = create(:user)
user2 = create :user user2 = create(:user)
project = create(:project, :public) project = create(:project, :public)
expect(project.star_count).to eq(0) expect(project.star_count).to eq(0)
...@@ -889,7 +889,7 @@ describe Project do ...@@ -889,7 +889,7 @@ describe Project do
end end
it 'counts stars on the right project' do it 'counts stars on the right project' do
user = create :user user = create(:user)
project1 = create(:project, :public) project1 = create(:project, :public)
project2 = create(:project, :public) project2 = create(:project, :public)
...@@ -1148,9 +1148,9 @@ describe Project do ...@@ -1148,9 +1148,9 @@ describe Project do
describe '#any_runners?' do describe '#any_runners?' do
context 'shared runners' do context 'shared runners' do
let(:project) { create :project, shared_runners_enabled: shared_runners_enabled } let(:project) { create(:project, shared_runners_enabled: shared_runners_enabled) }
let(:specific_runner) { create :ci_runner } let(:specific_runner) { create(:ci_runner) }
let(:shared_runner) { create :ci_runner, :shared } let(:shared_runner) { create(:ci_runner, :shared) }
context 'for shared runners disabled' do context 'for shared runners disabled' do
let(:shared_runners_enabled) { false } let(:shared_runners_enabled) { false }
...@@ -1208,9 +1208,9 @@ describe Project do ...@@ -1208,9 +1208,9 @@ describe Project do
end end
context 'group runners' do context 'group runners' do
let(:project) { create :project, group_runners_enabled: group_runners_enabled } let(:project) { create(:project, group_runners_enabled: group_runners_enabled) }
let(:group) { create :group, projects: [project] } let(:group) { create(:group, projects: [project]) }
let(:group_runner) { create :ci_runner, groups: [group] } let(:group_runner) { create(:ci_runner, groups: [group]) }
context 'for group runners disabled' do context 'for group runners disabled' do
let(:group_runners_enabled) { false } let(:group_runners_enabled) { false }
...@@ -1292,7 +1292,7 @@ describe Project do ...@@ -1292,7 +1292,7 @@ describe Project do
end end
describe '#pages_deployed?' do describe '#pages_deployed?' do
let(:project) { create :project } let(:project) { create(:project) }
subject { project.pages_deployed? } subject { project.pages_deployed? }
...@@ -1310,8 +1310,8 @@ describe Project do ...@@ -1310,8 +1310,8 @@ describe Project do
end end
describe '#pages_url' do describe '#pages_url' do
let(:group) { create :group, name: group_name } let(:group) { create(:group, name: group_name) }
let(:project) { create :project, namespace: group, name: project_name } let(:project) { create(:project, namespace: group, name: project_name) }
let(:domain) { 'Example.com' } let(:domain) { 'Example.com' }
subject { project.pages_url } subject { project.pages_url }
...@@ -1337,8 +1337,8 @@ describe Project do ...@@ -1337,8 +1337,8 @@ describe Project do
end end
describe '#pages_group_url' do describe '#pages_group_url' do
let(:group) { create :group, name: group_name } let(:group) { create(:group, name: group_name) }
let(:project) { create :project, namespace: group, name: project_name } let(:project) { create(:project, namespace: group, name: project_name) }
let(:domain) { 'Example.com' } let(:domain) { 'Example.com' }
let(:port) { 1234 } let(:port) { 1234 }
...@@ -1455,8 +1455,8 @@ describe Project do ...@@ -1455,8 +1455,8 @@ describe Project do
let(:private_group) { create(:group, visibility_level: 0) } let(:private_group) { create(:group, visibility_level: 0) }
let(:internal_group) { create(:group, visibility_level: 10) } let(:internal_group) { create(:group, visibility_level: 10) }
let(:private_project) { create :project, :private, group: private_group } let(:private_project) { create(:project, :private, group: private_group) }
let(:internal_project) { create :project, :internal, group: internal_group } let(:internal_project) { create(:project, :internal, group: internal_group) }
context 'when group is private project can not be internal' do context 'when group is private project can not be internal' do
it { expect(private_project.visibility_level_allowed?(Gitlab::VisibilityLevel::INTERNAL)).to be_falsey } it { expect(private_project.visibility_level_allowed?(Gitlab::VisibilityLevel::INTERNAL)).to be_falsey }
...@@ -2450,8 +2450,8 @@ describe Project do ...@@ -2450,8 +2450,8 @@ describe Project do
end end
describe '#pages_url' do describe '#pages_url' do
let(:group) { create :group, name: 'Group' } let(:group) { create(:group, name: 'Group') }
let(:nested_group) { create :group, parent: group } let(:nested_group) { create(:group, parent: group) }
let(:domain) { 'Example.com' } let(:domain) { 'Example.com' }
subject { project.pages_url } subject { project.pages_url }
...@@ -2462,7 +2462,7 @@ describe Project do ...@@ -2462,7 +2462,7 @@ describe Project do
end end
context 'top-level group' do context 'top-level group' do
let(:project) { create :project, namespace: group, name: project_name } let(:project) { create(:project, namespace: group, name: project_name) }
context 'group page' do context 'group page' do
let(:project_name) { 'group.example.com' } let(:project_name) { 'group.example.com' }
...@@ -2478,7 +2478,7 @@ describe Project do ...@@ -2478,7 +2478,7 @@ describe Project do
end end
context 'nested group' do context 'nested group' do
let(:project) { create :project, namespace: nested_group, name: project_name } let(:project) { create(:project, namespace: nested_group, name: project_name) }
let(:expected_url) { "http://group.example.com/#{nested_group.path}/#{project.path}" } let(:expected_url) { "http://group.example.com/#{nested_group.path}/#{project.path}" }
context 'group page' do context 'group page' do
...@@ -2496,7 +2496,7 @@ describe Project do ...@@ -2496,7 +2496,7 @@ describe Project do
end end
describe '#http_url_to_repo' do describe '#http_url_to_repo' do
let(:project) { create :project } let(:project) { create(:project) }
it 'returns the url to the repo without a username' do it 'returns the url to the repo without a username' do
expect(project.http_url_to_repo).to eq("#{project.web_url}.git") expect(project.http_url_to_repo).to eq("#{project.web_url}.git")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment