spec/lib/bamboozled/api/employee_spec.rb in bamboozled-0.1.0 vs spec/lib/bamboozled/api/employee_spec.rb in bamboozled-0.2.0

- old
+ new

@@ -3,23 +3,9 @@ RSpec.describe "Employees" do before do @client = Bamboozled.client(subdomain: "x", api_key: "x") end - it "Gets data in a hash with indifferent access" do - response = File.new("spec/fixtures/one_employee.json") - stub_request(:any, /.*api\.bamboohr\.com.*/).to_return(response) - - employee = @client.employee.find(1234) - - expect(employee).to be_a Hash - expect(employee.count).to eq 3 - expect(employee["firstName"]).to eq "John" - expect(employee[:firstName]).to eq "John" - expect(employee["lastName"]).to eq "Doe" - expect(employee[:lastName]).to eq "Doe" - end - it "Gets all employees" do response = File.new("spec/fixtures/all_employees.json") stub_request(:any, /.*api\.bamboohr\.com.*/).to_return(response) employees = @client.employee.all