From d9f41795bfa36baf5d391ab5466d0184e5a342c1 Mon Sep 17 00:00:00 2001 From: Yomi Colledge Date: Sun, 27 Jun 2010 21:10:23 +0100 Subject: [PATCH] Fixed broken scenario, caused by the change in our form structure. Though this change fixes this issue, it may have side effect which we'll need to verify before our merge --- app/controllers/features_controller.rb | 6 +++--- features/enhanced/ajaxified_forms.feature | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/features_controller.rb b/app/controllers/features_controller.rb index ad23cb1a..84a5b71f 100644 --- a/app/controllers/features_controller.rb +++ b/app/controllers/features_controller.rb @@ -31,11 +31,11 @@ def create flash[:notice] = "Feature: #{@feature.title}, was created" find_features_stories if "Submit" == params[:commit] - format.html { redirect_to @feature } - format.js { render "create.rjs" } - else format.html { redirect_to :back } format.js { render "index.rjs" } + else + format.html { redirect_to @feature } + format.js { render "create.rjs" } end else format.js { render :action => "edit" } diff --git a/features/enhanced/ajaxified_forms.feature b/features/enhanced/ajaxified_forms.feature index cbe664e6..a73769e7 100644 --- a/features/enhanced/ajaxified_forms.feature +++ b/features/enhanced/ajaxified_forms.feature @@ -33,7 +33,7 @@ Feature: All our forms need to be passed to the server via AJAX Then submit the form And there should be an AJAX request And the form should be hidden - And a flash message "Feature: Logging in via ajax, was created" should be dynamically displayed + And a flash message "was created" should be dynamically displayed Scenario: We should be able to submit an editted feature form via AJAX Given I can view the features page