diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-08 20:53:47 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-08 20:53:47 +0000 |
commit | ba88a47e966f72e02baebd12d8e974775c7ee72f (patch) | |
tree | ee19eec95c0a96f3541c47ac929267b323fcb87d | |
parent | 09747ecd3317fc2e1be54f4c944b718f5edf4ae9 (diff) | |
parent | 11a5971b51ce8b389d364d0ead05ebecf1bee362 (diff) | |
download | gitlab-ce-ba88a47e966f72e02baebd12d8e974775c7ee72f.tar.gz |
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
-rw-r--r-- | spec/models/ci/runner_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 48 |
2 files changed, 25 insertions, 25 deletions
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb index cc4d4e5e4ae..fa9dff1c0f1 100644 --- a/spec/models/ci/runner_spec.rb +++ b/spec/models/ci/runner_spec.rb @@ -198,7 +198,7 @@ describe Ci::Runner do end describe '#assign_to' do - let!(:project) { FactoryBot.create :project } + let!(:project) { FactoryBot.create(:project) } let!(:shared_runner) { FactoryBot.create(:ci_runner, :shared) } before do diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index a6e835e563d..5b452f17979 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -309,12 +309,12 @@ describe Project do describe 'project token' 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('') end 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') end end @@ -639,7 +639,7 @@ describe Project do describe '#to_param' do context 'with namespace' do before do - @group = create :group, name: 'gitlab' + @group = create(:group, name: 'gitlab') @project = create(:project, name: 'gitlabhq', namespace: @group) end @@ -866,8 +866,8 @@ describe Project do describe '#star_count' do it 'counts stars from multiple users' do - user1 = create :user - user2 = create :user + user1 = create(:user) + user2 = create(:user) project = create(:project, :public) expect(project.star_count).to eq(0) @@ -889,7 +889,7 @@ describe Project do end it 'counts stars on the right project' do - user = create :user + user = create(:user) project1 = create(:project, :public) project2 = create(:project, :public) @@ -1148,9 +1148,9 @@ describe Project do describe '#any_runners?' do context 'shared runners' do - let(:project) { create :project, shared_runners_enabled: shared_runners_enabled } - let(:specific_runner) { create :ci_runner } - let(:shared_runner) { create :ci_runner, :shared } + let(:project) { create(:project, shared_runners_enabled: shared_runners_enabled) } + let(:specific_runner) { create(:ci_runner) } + let(:shared_runner) { create(:ci_runner, :shared) } context 'for shared runners disabled' do let(:shared_runners_enabled) { false } @@ -1208,9 +1208,9 @@ describe Project do end context 'group runners' do - let(:project) { create :project, group_runners_enabled: group_runners_enabled } - let(:group) { create :group, projects: [project] } - let(:group_runner) { create :ci_runner, groups: [group] } + let(:project) { create(:project, group_runners_enabled: group_runners_enabled) } + let(:group) { create(:group, projects: [project]) } + let(:group_runner) { create(:ci_runner, groups: [group]) } context 'for group runners disabled' do let(:group_runners_enabled) { false } @@ -1292,7 +1292,7 @@ describe Project do end describe '#pages_deployed?' do - let(:project) { create :project } + let(:project) { create(:project) } subject { project.pages_deployed? } @@ -1310,8 +1310,8 @@ describe Project do end describe '#pages_url' do - let(:group) { create :group, name: group_name } - let(:project) { create :project, namespace: group, name: project_name } + let(:group) { create(:group, name: group_name) } + let(:project) { create(:project, namespace: group, name: project_name) } let(:domain) { 'Example.com' } subject { project.pages_url } @@ -1337,8 +1337,8 @@ describe Project do end describe '#pages_group_url' do - let(:group) { create :group, name: group_name } - let(:project) { create :project, namespace: group, name: project_name } + let(:group) { create(:group, name: group_name) } + let(:project) { create(:project, namespace: group, name: project_name) } let(:domain) { 'Example.com' } let(:port) { 1234 } @@ -1455,8 +1455,8 @@ describe Project do let(:private_group) { create(:group, visibility_level: 0) } let(:internal_group) { create(:group, visibility_level: 10) } - let(:private_project) { create :project, :private, group: private_group } - let(:internal_project) { create :project, :internal, group: internal_group } + let(:private_project) { create(:project, :private, group: private_group) } + let(:internal_project) { create(:project, :internal, group: internal_group) } context 'when group is private project can not be internal' do it { expect(private_project.visibility_level_allowed?(Gitlab::VisibilityLevel::INTERNAL)).to be_falsey } @@ -2450,8 +2450,8 @@ describe Project do end describe '#pages_url' do - let(:group) { create :group, name: 'Group' } - let(:nested_group) { create :group, parent: group } + let(:group) { create(:group, name: 'Group') } + let(:nested_group) { create(:group, parent: group) } let(:domain) { 'Example.com' } subject { project.pages_url } @@ -2462,7 +2462,7 @@ describe Project do end 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 let(:project_name) { 'group.example.com' } @@ -2478,7 +2478,7 @@ describe Project do end 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}" } context 'group page' do @@ -2496,7 +2496,7 @@ describe Project do end 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 expect(project.http_url_to_repo).to eq("#{project.web_url}.git") |