mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
fix regressions in cucumber tests. Add basis test for notes page
This commit is contained in:
parent
82bb67f518
commit
e03c521314
3 changed files with 8 additions and 13 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue