From ce044e881866727ff258093db47429c7fa6cdcfc Mon Sep 17 00:00:00 2001 From: benji Date: Fri, 18 Sep 2015 20:59:06 +0200 Subject: [PATCH] Revert "Fix tests" This reverts commit a9b331b193656ae0c6984be25ad4214a088cd920. --- db/migrate/20150918175817_add_barcode_to_products.rb | 5 ----- spec/models/ability_spec.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 db/migrate/20150918175817_add_barcode_to_products.rb diff --git a/db/migrate/20150918175817_add_barcode_to_products.rb b/db/migrate/20150918175817_add_barcode_to_products.rb deleted file mode 100644 index 6952895..0000000 --- a/db/migrate/20150918175817_add_barcode_to_products.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddBarcodeToProducts < ActiveRecord::Migration - def change - add_column :products, :barcode, :string, null: false, default: "" - end -end diff --git a/spec/models/ability_spec.rb b/spec/models/ability_spec.rb index 67473a6..a0d2fdc 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 - 1.minutes).ago)) } + it{ should be_able_to(:delete, Order.new(user: user, created_at: Rails.application.config.call_api_after.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) }