Permalink
Browse files

Ensure created object doesn't get its id from the ability

  • Loading branch information...
christophermanning committed Jul 11, 2012
1 parent 9d2547f commit 086ae6c3c53d03c7a7de5b00b7e3ae3959d40940
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/integration/authorization/cancan_spec.rb
@@ -9,7 +9,7 @@ def initialize(user)
can :manage, Player if user.roles.include? :manage_player
can :read, Player, :retired => false if user.roles.include? :read_player
can :create, Player, :suspended => true if user.roles.include? :create_player
- can :create, Player, :id => 2 if user.roles.include? :create_player
+ can :create, Player, :id => 12345 if user.roles.include? :create_player
can :update, Player, :retired => false if user.roles.include? :update_player
can :update, Player, :id => 2 if user.roles.include? :update_player
can :destroy, Player, :retired => false if user.roles.include? :destroy_player
@@ -130,7 +130,7 @@ def initialize(user)
should_not have_content("Edit")
@player = RailsAdmin::AbstractModel.new("Player").first
- @player.id.should eql(1)
+ @player.id.should_not eql(12345)
@player.name.should eql("Jackie Robinson")
@player.number.should eql(42)
@player.position.should eql("Second baseman")

0 comments on commit 086ae6c

Please sign in to comment.