diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-21 17:29:35 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:31:56 -0600 |
commit | 3dadf306ddc81183e74b048bc4119796852ed7ea (patch) | |
tree | f01d5e7eb9c5550bc34a42d9e88479cd3fef578d /spec/helpers | |
parent | 547063b3ac096dff25309b6e0846b0d5f417c128 (diff) | |
download | gitlab-ce-3dadf306ddc81183e74b048bc4119796852ed7ea.tar.gz |
Enable Style/DotPosition
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/issues_helper_spec.rb | 8 | ||||
-rw-r--r-- | spec/helpers/page_layout_helper_spec.rb | 4 | ||||
-rw-r--r-- | spec/helpers/visibility_level_helper_spec.rb | 32 |
3 files changed, 22 insertions, 22 deletions
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index 13fb9c1f1a7..e1e56582425 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -67,8 +67,8 @@ describe IssuesHelper do user = build_stubbed(:user, name: 'Joe') awards = Array.new(3, build_stubbed(:award_emoji, user: user)) - expect(award_user_list(awards, nil, limit: 3)) - .to eq('Joe, Joe, and Joe') + expect(award_user_list(awards, nil, limit: 3)). + to eq('Joe, Joe, and Joe') end it "displays the current user's name as 'You'" do @@ -83,8 +83,8 @@ describe IssuesHelper do user = build_stubbed(:user, name: 'Jane') awards = Array.new(5, build_stubbed(:award_emoji, user: user)) - expect(award_user_list(awards, nil, limit: 3)) - .to eq('Jane, Jane, Jane, and 2 more.') + expect(award_user_list(awards, nil, limit: 3)). + to eq('Jane, Jane, Jane, and 2 more.') end it "displays the current user in front of other users" do diff --git a/spec/helpers/page_layout_helper_spec.rb b/spec/helpers/page_layout_helper_spec.rb index 2cc0b40b2d0..9d7a39d3721 100644 --- a/spec/helpers/page_layout_helper_spec.rb +++ b/spec/helpers/page_layout_helper_spec.rb @@ -111,8 +111,8 @@ describe PageLayoutHelper do end it 'escapes content' do - allow(helper).to receive(:page_card_attributes) - .and_return(foo: %q{foo" http-equiv="refresh}.html_safe) + allow(helper).to receive(:page_card_attributes). + and_return(foo: %q{foo" http-equiv="refresh}.html_safe) tags = helper.page_card_meta_tags diff --git a/spec/helpers/visibility_level_helper_spec.rb b/spec/helpers/visibility_level_helper_spec.rb index 8942b00b128..387279b2031 100644 --- a/spec/helpers/visibility_level_helper_spec.rb +++ b/spec/helpers/visibility_level_helper_spec.rb @@ -9,52 +9,52 @@ describe VisibilityLevelHelper do describe 'visibility_level_description' do context 'used with a Project' do it 'delegates projects to #project_visibility_level_description' do - expect(visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, project)) - .to match /project/i + expect(visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, project)). + to match /project/i end end context 'used with a Group' do it 'delegates groups to #group_visibility_level_description' do - expect(visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, group)) - .to match /group/i + expect(visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, group)). + to match /group/i end end context 'called with a Snippet' do it 'delegates snippets to #snippet_visibility_level_description' do - expect(visibility_level_description(Gitlab::VisibilityLevel::INTERNAL, project_snippet)) - .to match /snippet/i + expect(visibility_level_description(Gitlab::VisibilityLevel::INTERNAL, project_snippet)). + to match /snippet/i end end end describe "#project_visibility_level_description" do it "describes private projects" do - expect(project_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE)) - .to eq "Project access must be granted explicitly to each user." + expect(project_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE)). + to eq "Project access must be granted explicitly to each user." end it "describes public projects" do - expect(project_visibility_level_description(Gitlab::VisibilityLevel::PUBLIC)) - .to eq "The project can be cloned without any authentication." + expect(project_visibility_level_description(Gitlab::VisibilityLevel::PUBLIC)). + to eq "The project can be cloned without any authentication." end end describe "#snippet_visibility_level_description" do it 'describes visibility only for me' do - expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, personal_snippet)) - .to eq "The snippet is visible only to me." + expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, personal_snippet)). + to eq "The snippet is visible only to me." end it 'describes visibility for project members' do - expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, project_snippet)) - .to eq "The snippet is visible only to project members." + expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, project_snippet)). + to eq "The snippet is visible only to project members." end it 'defaults to personal snippet' do - expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE)) - .to eq "The snippet is visible only to me." + expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE)). + to eq "The snippet is visible only to me." end end |