Use symbols to represent side
This commit is contained in:
parent
66044ddae1
commit
7278b77702
@ -30,7 +30,7 @@ module Rex
|
||||
when "order.create"
|
||||
Messages::CreateOrderRequest.new(
|
||||
nil,
|
||||
parsed_message["args"]["side"],
|
||||
parsed_message["args"]["side"].to_sym,
|
||||
parsed_message["args"]["price"],
|
||||
parsed_message["args"]["quantity"]
|
||||
)
|
||||
|
@ -60,7 +60,7 @@ RSpec.describe Rex::Server::MessageParser do
|
||||
it "returns a order create request" do
|
||||
expect(subject).to be_instance_of(Rex::Server::Messages::CreateOrderRequest)
|
||||
expect(subject.user_id).to eq(nil)
|
||||
expect(subject.side).to eq("buy")
|
||||
expect(subject.side).to eq(:buy)
|
||||
expect(subject.price).to eq(10)
|
||||
expect(subject.quantity).to eq(100)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user