Sha256: be264fb7086bab202b4a630889be97ba9f3d7c28a3b4abd7e42dd1e6a198746c

Contents?: true

Size: 685 Bytes

Versions: 4

Compression:

Stored size: 685 Bytes

Contents

#encoding: utf-8

require 'spec_helper'

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

  describe "#employment" do

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

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

    it "returns the requested employments" do
      employment = client.employment
      expect(employment).to be_an Array
      expect(employment.first).to be_an Hash
      expect(employment.first[:name]).to eq "Полная занятость"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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