Fix tests
This commit is contained in:
parent
c36fe9453a
commit
a9b331b193
2 changed files with 6 additions and 1 deletions
5
db/migrate/20150918175817_add_barcode_to_products.rb
Normal file
5
db/migrate/20150918175817_add_barcode_to_products.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddBarcodeToProducts < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :products, :barcode, :string, null: false, default: ""
|
||||
end
|
||||
end
|
|
@ -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) }
|
||||
|
||||
|
|
Loading…
Reference in a new issue