From 39cf927067d67a9ca3b6e6c2bee949b35eda82c9 Mon Sep 17 00:00:00 2001 From: John Kodumal Date: Mon, 25 Jan 2016 18:03:54 -0800 Subject: [PATCH] Update tests --- spec/ldclient_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/ldclient_spec.rb b/spec/ldclient_spec.rb index 03c82e59..52c7cd8e 100644 --- a/spec/ldclient_spec.rb +++ b/spec/ldclient_spec.rb @@ -101,18 +101,18 @@ end end - describe '#get_features' do + describe '#all_flags' do it "will parse and return the features list" do - result = double("Faraday::Response", status: 200, body: '{"items": ["asdf"]}') - expect(client).to receive(:make_request).with("/api/features").and_return(result) - data = client.send(:get_features) - expect(data).to eq ["asdf"] + result = double("Faraday::Response", status: 200, body: '{"foo": {"key": "foo"}}') + expect(client).to receive(:make_request).with("/api/eval/features").and_return(result) + data = client.send(:all_flags) + expect(data).to eq {foo : {key: "foo"}} end it "will log errors" do result = double("Faraday::Response", status: 418) - expect(client).to receive(:make_request).with("/api/features").and_return(result) + expect(client).to receive(:make_request).with("/api/eval/features").and_return(result) expect(client.instance_variable_get(:@config).logger).to receive(:error) - client.send(:get_features) + client.send(:all_flags) end end