spec/bamboo-client/rest_spec.rb in bamboo-client-0.1.8 vs spec/bamboo-client/rest_spec.rb in bamboo-client-0.1.9
- old
+ new
@@ -21,66 +21,65 @@
it "should be able to fetch plans" do
document.should_receive(:auto_expand).with(Rest::Plan, http).and_return %w[foo bar]
http.should_receive(:get).with(
"/rest/api/latest/plan/",
- nil,
nil
).and_return(document)
client.plans.should == %w[foo bar]
end
it "should be able to fetch projects" do
document.should_receive(:auto_expand).with(Rest::Project, http).and_return %w[foo bar]
- http.should_receive(:get).with("/rest/api/latest/project/", nil, nil).
+ http.should_receive(:get).with("/rest/api/latest/project/", nil).
and_return(document)
client.projects.should == %w[foo bar]
end
it "should be able to fetch results" do
document.should_receive(:auto_expand).with(Rest::Result, http).and_return %w[foo bar]
- http.should_receive(:get).with("/rest/api/latest/result/", nil, nil).
+ http.should_receive(:get).with("/rest/api/latest/result/", nil).
and_return(document)
client.results.should == %w[foo bar]
end
it "should be able to fetch the queue" do
document.should_receive(:data).and_return('some' => 'data')
- http.should_receive(:get).with("/rest/api/latest/queue/", nil, nil).
+ http.should_receive(:get).with("/rest/api/latest/queue/", nil).
and_return(document)
client.queue().should be_kind_of(Rest::Queue)
end
it "should be able to fetch results for a specific key" do
document.should_receive(:auto_expand).with(Rest::Result, http).and_return %w[foo bar]
- http.should_receive(:get).with("/rest/api/latest/result/SOME-KEY", nil, nil).
+ http.should_receive(:get).with("/rest/api/latest/result/SOME-KEY", nil).
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).
+ http.should_receive(:get).with("/rest/api/latest/plan/SOME-KEY", nil).
and_return(document)
client.plan_for("SOME-KEY").should be_kind_of(Rest::Plan)
end
it "should be able to fetch a project for a specific key" do
document.should_receive(:data).and_return('some' => 'data')
- http.should_receive(:get).with("/rest/api/latest/project/SOME-KEY", nil, nil).
+ http.should_receive(:get).with("/rest/api/latest/project/SOME-KEY", nil).
and_return(document)
client.project_for("SOME-KEY").should be_kind_of(Rest::Project)
end