Sha256: 2474e79d3be37326ddd398b814c7d6f83314337d6d8cc145f6321053c14ed4b0
Contents?: true
Size: 699 Bytes
Versions: 2
Compression:
Stored size: 699 Bytes
Contents
#enoding: utf-8 require 'spec_helper' describe HH::API::Vacancy do let(:client) { HH::Client.new } let(:vacancy_id) { 2618300 } let(:request_path) { "vacancy/#{vacancy_id}" } describe "#vacancy" do before do stub_get(request_path).to_return(body: fixture("vacancy.json"), headers: {content_type: "application/json; charset=utf-8"}) end it "requests the correct resource" do client.vacancy(vacancy_id) expect(a_get(request_path)).to have_been_made end it "returns the requested metro list" do vacancy = client.vacancy(vacancy_id) expect(vacancy).to be_an Hash expect(vacancy[:name]).to eq "Верстальщик" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hh-0.0.6 | spec/hh/api/vacancy_spec.rb |
hh-0.0.5 | spec/hh/api/vacancy_spec.rb |