1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

(bug) fix running tests

This commit is contained in:
Sylvain 2022-03-23 16:55:38 +01:00
parent e503d28b4d
commit 746ec1f3f1
2 changed files with 3 additions and 8 deletions

View File

@ -19,13 +19,8 @@ class Events::AsUserTest < ActionDispatch::IntegrationTest
wallet_transactions_count = WalletTransaction.count
# Enable the VAT at 19.6%
vat_active = Setting.get('invoice_VAT-active')
vat_active.value = 'true'
vat_active.save!
vat_rate = Setting.get('invoice_VAT-rate')
vat_rate.value = '19.6'
vat_rate.save!
Setting.set('invoice_VAT-active', true)
Setting.set('invoice_VAT-rate', '19.6')
# Reserve the 'radio' event
VCR.use_cassette('reserve_event_with_many_prices_and_payment_means') do

View File

@ -22,7 +22,7 @@ class SettingsTest < ActionDispatch::IntegrationTest
assert_equal 'Test Fablab', resp[:setting][:value]
# Check record
setting = Setting.get(resp[:setting][:name])
setting = Setting.find_by(name: resp[:setting][:name])
assert_not_nil setting, 'setting was not found in database'
assert_equal 2, setting.history_values.count, 'all historical values were not found'
assert_includes setting.history_values.map(&:value), 'Fab Lab de La Casemate', 'previous parameter was not saved'