Use new hash syntax in Voucher spec

This commit is contained in:
Maikel Linke
2023-08-14 12:40:54 +10:00
parent 160cdc7f8e
commit ba53f31309
2 changed files with 8 additions and 9 deletions

View File

@@ -1322,7 +1322,6 @@ Style/HashSyntax:
- 'spec/queries/customers_with_balance_spec.rb'
- 'spec/queries/outstanding_balance_spec.rb'
- 'spec/queries/payments_requiring_action_spec.rb'
- 'spec/requests/admin/vouchers_controller_spec.rb'
- 'spec/requests/api/v1/customers_spec.rb'
- 'spec/requests/checkout/failed_checkout_spec.rb'
- 'spec/requests/checkout/paypal_spec.rb'

View File

@@ -9,7 +9,7 @@ describe "/admin/enterprises/:enterprise_id/vouchers", type: :request do
before do
Flipper.enable(:vouchers)
enterprise_user.enterprise_roles.build(enterprise: enterprise).save
enterprise_user.enterprise_roles.build(enterprise:).save
sign_in enterprise_user
end
@@ -22,14 +22,14 @@ describe "/admin/enterprises/:enterprise_id/vouchers", type: :request do
end
describe "POST /admin/enterprises/:enterprise_id/vouchers" do
subject(:create_voucher) { post admin_enterprise_vouchers_path(enterprise), params: params }
subject(:create_voucher) { post admin_enterprise_vouchers_path(enterprise), params: }
let(:params) do
{
voucher: {
code: code,
amount: amount,
type: type
code:,
amount:,
type:
}
}
end
@@ -53,9 +53,9 @@ describe "/admin/enterprises/:enterprise_id/vouchers", type: :request do
let(:params) do
{
voucher: {
code: code,
amount: amount,
type: type
code:,
amount:,
type:
}
}
end