fix regressions in cucumber tests. Add basis test for notes page

This commit is contained in:
Reinier Balt 2012-07-12 23:33:36 +02:00
parent 82bb67f518
commit e03c521314
3 changed files with 8 additions and 13 deletions

View file

@ -108,7 +108,7 @@ module ApplicationHelper
end
def link_to_edit_note (note, descriptor = sanitize(note.id.to_s))
link_to(descriptor, edit_notes_path(note),
link_to(descriptor, edit_note_path(note),
{:id => "link_edit_#{dom_id(note)}", :class => "note_edit_settings"})
end

View file

@ -14,14 +14,13 @@ Feature: Edit a next action from the mobile view
| context | description |
| @mobile | test action |
Scenario: I can edit an action on the mobile page
When I am on the home page
Then the badge should show 1
And I should see "test action"
When I follow "test action"
Then I should see "Actions"
When I press "Edit this action"
When I press "Edit action"
Then I should see "Description"
And I fill in "Description" with "changed action"
And I press "Update"

View file

@ -1,18 +1,14 @@
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
require 'notes_controller'
# Re-raise errors caught by the controller.
class NotesController; def rescue_action(e) raise e end; end
class NotesControllerTest < ActionController::TestCase
def setup
@controller = NotesController.new
request = ActionController::TestRequest.new
response = ActionController::TestResponse.new
end
# Replace this with your real tests.
def test_truth
assert true
def test_get_notes_page
login_as :admin_user
get :index
assert_response 200
end
end