add commitCreateStakeRemoveRequestMutation

This commit is contained in:
João Geonizeli
2021-08-28 00:28:29 -03:00
parent 3967e182cf
commit 5a3bae9c65
25 changed files with 599 additions and 120 deletions

View File

@@ -6,13 +6,11 @@ RSpec.describe(Mutations::CreateStakeOrder, type: :mutation) do
let(:query_string) do
<<~GQL
mutation(
$currencyId: ID!,
$amount: String!,
$poolName: String!,
) {
createStakeOrder(input: {
order: {
currencyId: $currencyId,
amount: $amount,
poolName: $poolName,
}
@@ -43,10 +41,7 @@ RSpec.describe(Mutations::CreateStakeOrder, type: :mutation) do
]
)
currency_global_id = GraphQL::Schema::UniqueWithinType.encode("Currency", currency.id)
variables = {
"currencyId": currency_global_id,
"amount": "0.80",
"poolName": "CAKE/BNB",
"status": "PROCESSING",
@@ -87,10 +82,7 @@ RSpec.describe(Mutations::CreateStakeOrder, type: :mutation) do
]
)
currency_global_id = GraphQL::Schema::UniqueWithinType.encode("Currency", currency.id)
variables = {
"currencyId": currency_global_id,
"amount": "0.80",
"poolName": "CAKE/BNB",
}

View File

@@ -6,13 +6,11 @@ RSpec.describe(Mutations::CreateStakeRemoveOrder, type: :mutation) do
let(:query_string) do
<<~GQL
mutation(
$currencyId: ID!,
$amount: String!,
$poolName: String!,
) {
createStakeRemoveOrder(input: {
order: {
currencyId: $currencyId,
amount: $amount,
poolName: $poolName,
}
@@ -43,11 +41,8 @@ RSpec.describe(Mutations::CreateStakeRemoveOrder, type: :mutation) do
]
)
currency_global_id = GraphQL::Schema::UniqueWithinType.encode("Currency", currency.id)
variables = {
"currencyId": currency_global_id,
"amount": "-200.80",
"amount": "200.80",
"poolName": "CAKE/BNB",
"status": "PROCESSING",
}
@@ -85,13 +80,10 @@ RSpec.describe(Mutations::CreateStakeRemoveOrder, type: :mutation) do
]
)
currency_global_id = GraphQL::Schema::UniqueWithinType.encode("Currency", currency.id)
create(:stake_order, amount: -200.8, user: user, pool_name: "CAKE/BNB", currency: currency)
variables = {
"currencyId": currency_global_id,
"amount": "-200.80",
"amount": "200.80",
"poolName": "CAKE/BNB",
}