spec/mongoid/owner_permits_spec.rb in cancan-permits-0.2.1 vs spec/mongoid/owner_permits_spec.rb in cancan-permits-0.2.2
- old
+ new
@@ -5,11 +5,11 @@
context "using default :user_id relation - foreign key to User.id" do
before :each do
@editor = User.create(:name => "Kristian", :role => "editor")
@other_guy = User.create(:name => "Random dude", :role => "admin")
- @ability = Permits::Ability.new(@editor, :strategy => :mongoid)
+ @ability = Permits::Ability.new(@editor, :strategy => :orm)
@own_comment = Comment.create(:user_id => @editor.id)
@other_comment = Comment.create(:user_id => @other_guy.id)
# @post = Post.create(:writer => @editor.id)
# @article = Article.create(:author => @editor.id)
@@ -40,10 +40,10 @@
context "using custom :writer relation - foreign key to User.id" do
before :each do
@editor = User.create(:name => "Kristian", :role => "editor")
@other_guy = User.create(:name => "Random dude", :role => "admin")
- @ability = Permits::Ability.new(@editor, :strategy => :mongoid)
+ @ability = Permits::Ability.new(@editor, :strategy => :mongo)
@own_post = Post.create(:writer => @editor.id)
@other_post = Post.create(:writer => @other_guy.id)
end
\ No newline at end of file