fix tests

This commit is contained in:
benji 2015-09-18 21:00:58 +02:00
parent ce044e8818
commit 4fcc598193

View file

@ -21,7 +21,7 @@ describe User do
it{ should_not be_able_to(:manage, Product.new) }
it{ should be_able_to(:create, Order.new(user: user)) }
it{ should be_able_to(:delete, Order.new(user: user, created_at: Rails.application.config.call_api_after.minutes.ago)) }
it{ should be_able_to(:delete, Order.new(user: user, created_at: (Rails.application.config.call_api_after - 1.minutes).ago)) }
it{ should_not be_able_to(:delete, Order.new(user: user, created_at: 10.minutes.ago)) }
it{ should_not be_able_to(:manage, Order.new) }