Sha256: 499dbc14ede5239cf0e2a03ca199425026144e429c4f51e0fa3cbecbcc11b45a

Contents?: true

Size: 635 Bytes

Versions: 4

Compression:

Stored size: 635 Bytes

Contents

#encoding: utf-8

require 'spec_helper'

describe HH::API::Currency do
  let(:client) { HH::Client.new }

  describe "#currency" do

    before do
      stub_get("currency").to_return(body: fixture("currency.json"), headers: {content_type: "application/json; charset=utf-8"})
    end

    it "requests the correct resource" do
      client.currency
      expect(a_get("currency")).to have_been_made
    end

    it "returns the requested currency list" do
      currency = client.currency
      expect(currency).to be_an Array
      expect(currency.first).to be_an Hash
      expect(currency.first[:code]).to eq "RUR"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hh-0.0.7 spec/hh/api/currency_spec.rb
hh-0.0.6 spec/hh/api/currency_spec.rb
hh-0.0.5 spec/hh/api/currency_spec.rb
hh-0.0.4 spec/hh/api/currency_spec.rb