mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 08:46:11 +01:00
move mapping of form attributes to model attributes from pattern to builder to make
pattern independent of form
This commit is contained in:
parent
1f36c27af8
commit
776a046465
22 changed files with 463 additions and 446 deletions
|
|
@ -9,13 +9,21 @@ class RecurringTodosControllerTest < ActionController::TestCase
|
|||
|
||||
def test_destroy_recurring_todo
|
||||
login_as(:admin_user)
|
||||
|
||||
rc = RecurringTodo.find(1)
|
||||
todo = rc.todos.first
|
||||
|
||||
xhr :post, :destroy, :id => 1, :_source_view => 'todo'
|
||||
|
||||
begin
|
||||
rc = RecurringTodo.find(1)
|
||||
rescue
|
||||
rc = nil
|
||||
end
|
||||
assert_nil rc
|
||||
|
||||
assert_nil rc, "rc should be deleted"
|
||||
assert_nil todo.reload.recurring_todo_id, "todo should be unlinked from deleted recurring_todo"
|
||||
|
||||
end
|
||||
|
||||
def test_new_recurring_todo
|
||||
|
|
@ -362,7 +370,6 @@ class RecurringTodosControllerTest < ActionController::TestCase
|
|||
def test_update_recurring_todo
|
||||
login_as(:admin_user)
|
||||
rt = recurring_todos(:call_bill_gates_every_day)
|
||||
current_descr = rt.description
|
||||
|
||||
put :update,
|
||||
"recurring_todo" => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue