From 810b3e3038246e15b054e3a50f82ddc11d3ec355 Mon Sep 17 00:00:00 2001 From: Fellipe Souto Sampaio Date: Mon, 20 Jan 2014 16:58:42 -0200 Subject: [PATCH] Edit feature for Reading --- app/controllers/readings_controller.rb | 2 +- features/reading/edit.feature | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/controllers/readings_controller.rb b/app/controllers/readings_controller.rb index cd50c18..75a74ea 100644 --- a/app/controllers/readings_controller.rb +++ b/app/controllers/readings_controller.rb @@ -29,7 +29,7 @@ class ReadingsController < ApplicationController @reading.group_id = params[:reading_group_id].to_i respond_to do |format| if @reading.update(reading_params) - format.html { redirect_to(reading_group_reading_path(params[:reading_group_id].to_i, @reading.id), notice: 'Reading was successfully updated.') } + format.html { redirect_to(reading_group_path(params[:reading_group_id].to_i), notice: 'Reading was successfully updated.') } format.json { head :no_content } else failed_action(format, 'edit') diff --git a/features/reading/edit.feature b/features/reading/edit.feature index 71edc49..1bbe9dd 100644 --- a/features/reading/edit.feature +++ b/features/reading/edit.feature @@ -3,7 +3,7 @@ Feature: Reading Edit As a regular user I should be able to edit my readings -@kalibro_restart @wip +@kalibro_restart Scenario: editing a reading successfully Given I am a regular user And I am signed in @@ -16,9 +16,7 @@ Feature: Reading Edit When I fill the Label field with "Bad" And I press the Save button Then I should see "Bad" - And I should see "10.5" - And I should see "33dd33" - + @kalibro_restart Scenario: editing a reading with blank fields Given I am a regular user -- libgit2 0.21.2