summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/reference_parser/base_parser_spec.rb
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-08-08 11:55:13 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2016-08-30 11:35:06 -0700
commit5853c96b49010aaf33b85caeb94dfc18873d5656 (patch)
treec685956bbc4cb007e72c8548a0b4000df1bc4948 /spec/lib/banzai/reference_parser/base_parser_spec.rb
parentc218dd90dabb0ddff7fab09abbb348fe1c56201b (diff)
downloadgitlab-ce-5853c96b49010aaf33b85caeb94dfc18873d5656.tar.gz
remove Ability.abilities
Diffstat (limited to 'spec/lib/banzai/reference_parser/base_parser_spec.rb')
-rw-r--r--spec/lib/banzai/reference_parser/base_parser_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/banzai/reference_parser/base_parser_spec.rb b/spec/lib/banzai/reference_parser/base_parser_spec.rb
index ac9c66e2663..9095d2b1345 100644
--- a/spec/lib/banzai/reference_parser/base_parser_spec.rb
+++ b/spec/lib/banzai/reference_parser/base_parser_spec.rb
@@ -30,7 +30,7 @@ describe Banzai::ReferenceParser::BaseParser, lib: true do
it 'returns the nodes if the attribute value equals the current project ID' do
link['data-project'] = project.id.to_s
- expect(Ability.abilities).not_to receive(:allowed?)
+ expect(Ability).not_to receive(:allowed?)
expect(subject.nodes_visible_to_user(user, [link])).to eq([link])
end
@@ -39,7 +39,7 @@ describe Banzai::ReferenceParser::BaseParser, lib: true do
link['data-project'] = other_project.id.to_s
- expect(Ability.abilities).to receive(:allowed?).
+ expect(Ability).to receive(:allowed?).
with(user, :read_project, other_project).
and_return(true)
@@ -57,7 +57,7 @@ describe Banzai::ReferenceParser::BaseParser, lib: true do
link['data-project'] = other_project.id.to_s
- expect(Ability.abilities).to receive(:allowed?).
+ expect(Ability).to receive(:allowed?).
with(user, :read_project, other_project).
and_return(false)
@@ -221,7 +221,7 @@ describe Banzai::ReferenceParser::BaseParser, lib: true do
it 'delegates the permissions check to the Ability class' do
user = double(:user)
- expect(Ability.abilities).to receive(:allowed?).
+ expect(Ability).to receive(:allowed?).
with(user, :read_project, project)
subject.can?(user, :read_project, project)