From 342d5537091e61c1fc52f3e54df926159f326eb8 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 26 Jun 2015 15:55:56 +0200 Subject: Rename abilities to correspond contoller/model action names write_ was renamed to create_ modify_ was renamed to update_ So now in update action we have next code def create can?(current_user, :create_issue, @issue) end def update can?(current_user, :update_issue, @issue) end Signed-off-by: Dmitriy Zaporozhets --- spec/models/note_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/models/note_spec.rb') diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 9037992bb08..eba33dd510f 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -172,9 +172,9 @@ describe Note do @p2.project_members.create(user: @u3, access_level: ProjectMember::DEVELOPER) end - it { expect(@abilities.allowed?(@u1, :write_note, @p1)).to be_falsey } - it { expect(@abilities.allowed?(@u2, :write_note, @p1)).to be_truthy } - it { expect(@abilities.allowed?(@u3, :write_note, @p1)).to be_falsey } + it { expect(@abilities.allowed?(@u1, :create_note, @p1)).to be_falsey } + it { expect(@abilities.allowed?(@u2, :create_note, @p1)).to be_truthy } + it { expect(@abilities.allowed?(@u3, :create_note, @p1)).to be_falsey } end describe 'admin' do -- cgit v1.2.1