From 6fe23ac1f5fe27932ab283510f4f2c42a48cb472 Mon Sep 17 00:00:00 2001 From: Simon Rozet Date: Sun, 20 Jul 2008 23:33:38 +0200 Subject: [PATCH] restfulify build manual building [#4 state:resolved] --- lib/integrity/ui/web.rb | 2 +- spec/ui/web_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/integrity/ui/web.rb b/lib/integrity/ui/web.rb index 0a401c6c..f0d8bfa6 100644 --- a/lib/integrity/ui/web.rb +++ b/lib/integrity/ui/web.rb @@ -52,7 +52,7 @@ show :new, :title => ["projects", @project.permalink, "edit"] end -post "/:project/build" do +post "/:project/builds" do @project = Project.first(:permalink => params[:project]) @project.build redirect project_url(@project) diff --git a/spec/ui/web_spec.rb b/spec/ui/web_spec.rb index 0a7b7af2..29cdacfb 100644 --- a/spec/ui/web_spec.rb +++ b/spec/ui/web_spec.rb @@ -229,12 +229,12 @@ def mock_project(messages={}) it "should build the project" do Project.stub!(:first).with(:permalink => "integrity").and_return mock_project mock_project.should_receive(:build) - post_it "/integrity/build" + post_it "/integrity/builds" end it "should redirect back to the project" do Project.stub!(:first).with(:permalink => "integrity").and_return mock_project - post_it "/integrity/build" + post_it "/integrity/builds" follow! status.should == 200 end