From 4fcc598193dc116b00efc5e3ef0cd5d0af26b459 Mon Sep 17 00:00:00 2001 From: benji Date: Fri, 18 Sep 2015 21:00:58 +0200 Subject: [PATCH] fix tests --- spec/models/ability_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/ability_spec.rb b/spec/models/ability_spec.rb index a0d2fdc..67473a6 100644 --- a/spec/models/ability_spec.rb +++ b/spec/models/ability_spec.rb @@ -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) }