spec/lib/stellar/client_spec.rb in stellar-sdk-0.7.0 vs spec/lib/stellar/client_spec.rb in stellar-sdk-0.8.0

- old
+ new

@@ -2,10 +2,27 @@ describe Stellar::Client do subject(:client) { Stellar::Client.default_testnet } + describe "headers" do + let(:headers) { client.horizon.headers } + + it "has 'Accept'" do + expect(headers["Accept"]). + to eq "application/hal+json,application/problem+json,application/json" + end + + it "has 'X-Client-Name'" do + expect(headers["X-Client-Name"]).to eq "ruby-stellar-sdk" + end + + it "has 'X-Client-Version'" do + expect(headers["X-Client-Version"]).to eq Stellar::VERSION + end + end + describe "#default_testnet" do it 'instantiates a client pointing to horizon testnet' do client = described_class.default_testnet expect(client.horizon._url).to eq(described_class::HORIZON_TESTNET_URL) end @@ -408,6 +425,6 @@ expect(btc_balance).to be_nil end end end -end +end \ No newline at end of file