spec/bamboo-client/rest_spec.rb in bamboo-client-0.1.1 vs spec/bamboo-client/rest_spec.rb in bamboo-client-0.1.2

- old
+ new

@@ -55,9 +55,18 @@ and_return(document) client.results_for("SOME-KEY").should == %w[foo bar] end + it "should be able to fetch a plan for a specific key" do + document.should_receive(:data).and_return('some' => 'data') + + http.should_receive(:get).with("/rest/api/latest/plan/SOME-KEY", nil, nil). + and_return(document) + + client.plan_for("SOME-KEY").should be_kind_of(Rest::Plan) + end + describe Rest::Plan do let(:data) { json_fixture("plan") } let(:plan) { Rest::Plan.new data, http } it "knows if the plan is enabled" do