Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit c854d01

Browse files
committed
chore: Merge branch 'bill' into dev
2 parents f223c90 + f68600d commit c854d01

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

test/groupher_server_web/mutation/billing/billing_test.exs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,31 @@ defmodule GroupherServer.Test.Mutation.Billing.Basic do
2424
$paymentMethod: PaymentMethodEnum!
2525
$paymentUsage: PaymentUsageEnum!
2626
$amount: Float!
27+
$note: String
2728
) {
2829
createBill(
2930
paymentMethod: $paymentMethod
3031
paymentUsage: $paymentUsage
3132
amount: $amount
33+
note: $note
3234
) {
3335
id
3436
state
3537
amount
3638
hashId
3739
paymentUsage
3840
paymentMethod
41+
note
3942
}
4043
}
4144
"""
4245
test "auth user can create bill", ~m(user_conn valid_attrs)a do
4346
variables = valid_attrs |> camelize_map_key(:upcase)
44-
4547
created = user_conn |> mutation_result(@create_query, variables, "createBill")
4648

4749
assert created["amount"] == @senior_amount_threshold
4850
assert created["state"] == "pending"
51+
assert created["note"] !== nil
4952
end
5053

5154
@update_query """

test/support/factory.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ defmodule GroupherServer.Support.Factory do
277277
%{
278278
payment_usage: "donate",
279279
payment_method: "alipay",
280-
amount: 51.2
280+
amount: 51.2,
281+
note: "thank you"
281282
}
282283
end
283284

0 commit comments

Comments
 (0)