summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/reference_parser/user_parser_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/banzai/reference_parser/user_parser_spec.rb')
-rw-r--r--spec/lib/banzai/reference_parser/user_parser_spec.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/lib/banzai/reference_parser/user_parser_spec.rb b/spec/lib/banzai/reference_parser/user_parser_spec.rb
index f2f11cd5088..31ca9d27b0b 100644
--- a/spec/lib/banzai/reference_parser/user_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/user_parser_spec.rb
@@ -82,17 +82,17 @@ describe Banzai::ReferenceParser::UserParser, lib: true do
end
it 'returns the nodes if the user can read the group' do
- expect(Ability).to receive(:allowed?)
- .with(user, :read_group, group)
- .and_return(true)
+ expect(Ability).to receive(:allowed?).
+ with(user, :read_group, group).
+ and_return(true)
expect(subject.nodes_visible_to_user(user, [link])).to eq([link])
end
it 'returns an empty Array if the user can not read the group' do
- expect(Ability).to receive(:allowed?)
- .with(user, :read_group, group)
- .and_return(false)
+ expect(Ability).to receive(:allowed?).
+ with(user, :read_group, group).
+ and_return(false)
expect(subject.nodes_visible_to_user(user, [link])).to eq([])
end
@@ -115,9 +115,9 @@ describe Banzai::ReferenceParser::UserParser, lib: true do
link['data-project'] = other_project.id.to_s
- expect(Ability).to receive(:allowed?)
- .with(user, :read_project, other_project)
- .and_return(true)
+ expect(Ability).to receive(:allowed?).
+ with(user, :read_project, other_project).
+ and_return(true)
expect(subject.nodes_visible_to_user(user, [link])).to eq([link])
end
@@ -127,9 +127,9 @@ describe Banzai::ReferenceParser::UserParser, lib: true do
link['data-project'] = other_project.id.to_s
- expect(Ability).to receive(:allowed?)
- .with(user, :read_project, other_project)
- .and_return(false)
+ expect(Ability).to receive(:allowed?).
+ with(user, :read_project, other_project).
+ and_return(false)
expect(subject.nodes_visible_to_user(user, [link])).to eq([])
end