add create sell and buy crypto order mutations
This commit is contained in:
16
spec/graphql/types/buy_crypto_order_type_spec.rb
Normal file
16
spec/graphql/types/buy_crypto_order_type_spec.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe(Types::BuyCryptoOrderType) do
|
||||
subject { described_class }
|
||||
|
||||
describe "arguments" do
|
||||
it { is_expected.to(have_a_field(:id).of_type("ID!")) }
|
||||
it { is_expected.to(have_a_field(:currency).of_type("Currency!")) }
|
||||
it { is_expected.to(have_a_field(:paid_amount_cents).of_type("Int!")) }
|
||||
it { is_expected.to(have_a_field(:received_amount).of_type("String")) }
|
||||
it { is_expected.to(have_a_field(:status).of_type("ProcessStatus!")) }
|
||||
it { is_expected.to(have_a_field(:created_at).of_type("ISO8601DateTime!")) }
|
||||
it { is_expected.to(have_a_field(:updated_at).of_type("ISO8601DateTime!")) }
|
||||
end
|
||||
end
|
||||
9
spec/graphql/types/process_status_enum_spec.rb
Normal file
9
spec/graphql/types/process_status_enum_spec.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "rails_helper"
|
||||
|
||||
describe Types::ProcessStatusEnum do
|
||||
describe "values" do
|
||||
it { expect(described_class.values.keys).to(match(["PROCESSING", "COMPLETED", "CANCELED"])) }
|
||||
end
|
||||
end
|
||||
14
spec/graphql/types/record_invalid_type_spec.rb
Normal file
14
spec/graphql/types/record_invalid_type_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "rails_helper"
|
||||
|
||||
describe Types::RecordInvalidType do
|
||||
subject { described_class }
|
||||
|
||||
describe "fields" do
|
||||
it { is_expected.to(have_field(:full_messages).of_type("[String!]!")) }
|
||||
it { is_expected.to(have_field(:field_name).of_type("String")) }
|
||||
it { is_expected.to(have_field(:messages).of_type("[String!]")) }
|
||||
it { is_expected.to(have_field(:path).of_type("[String!]")) }
|
||||
end
|
||||
end
|
||||
16
spec/graphql/types/sell_crypto_order_type_spec.rb
Normal file
16
spec/graphql/types/sell_crypto_order_type_spec.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe(Types::SellCryptoOrderType) do
|
||||
subject { described_class }
|
||||
|
||||
describe "arguments" do
|
||||
it { is_expected.to(have_a_field(:id).of_type("ID!")) }
|
||||
it { is_expected.to(have_a_field(:currency).of_type("Currency!")) }
|
||||
it { is_expected.to(have_a_field(:paid_amount).of_type("String!")) }
|
||||
it { is_expected.to(have_a_field(:received_amount_cents).of_type("Int")) }
|
||||
it { is_expected.to(have_a_field(:status).of_type("ProcessStatus!")) }
|
||||
it { is_expected.to(have_a_field(:created_at).of_type("ISO8601DateTime!")) }
|
||||
it { is_expected.to(have_a_field(:updated_at).of_type("ISO8601DateTime!")) }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user