mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
do not display invoice update logs in test mode + updated reservations fixtures w/o stp_invoice_id column + helper script to run tests
This commit is contained in:
parent
9fc3c7f61c
commit
78e6392f60
@ -313,6 +313,7 @@ class Invoice < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def log_changes
|
||||
return if Rails.env.test?
|
||||
return unless changed?
|
||||
|
||||
puts "WARNING: Invoice update triggered [ id: #{id}, reference: #{reference} ]"
|
||||
|
@ -35,6 +35,7 @@ class InvoiceItem < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def log_changes
|
||||
return if Rails.env.test?
|
||||
return unless changed?
|
||||
|
||||
puts "WARNING: InvoiceItem update triggered [ id: #{id}, invoice reference: #{invoice.reference} ]"
|
||||
|
6
scripts/run-tests.sh
Normal file
6
scripts/run-tests.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
RAILS_ENV=test rake db:drop
|
||||
RAILS_ENV=test rake db:create
|
||||
RAILS_ENV=test rake db:migrate
|
||||
rake test
|
2
test/fixtures/reservations.yml
vendored
2
test/fixtures/reservations.yml
vendored
@ -7,7 +7,6 @@ reservation_1:
|
||||
updated_at: 2012-03-12 11:03:31.651441000 Z
|
||||
reservable_id: 2
|
||||
reservable_type: Training
|
||||
stp_invoice_id:
|
||||
nb_reserve_places:
|
||||
|
||||
reservation_2:
|
||||
@ -18,5 +17,4 @@ reservation_2:
|
||||
updated_at: 2015-06-10 11:20:01.341130000 Z
|
||||
reservable_id: 4
|
||||
reservable_type: Machine
|
||||
stp_invoice_id:
|
||||
nb_reserve_places:
|
||||
|
Loading…
Reference in New Issue
Block a user