mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
Add the remaining necessary parameters to the test
This commit is contained in:
parent
e3b064638c
commit
beed8773e6
1 changed files with 19 additions and 1 deletions
|
@ -230,13 +230,31 @@ class TodosControllerTest < ActionController::TestCase
|
|||
"description" => "Call Warren Buffet to find out how much he makes per day",
|
||||
"due" => "30/11/2006"
|
||||
},
|
||||
"_source_view" => "context",
|
||||
"tag_list" => "foo bar"
|
||||
}
|
||||
assert_response 200
|
||||
end
|
||||
end
|
||||
|
||||
def test_create_todo_via_xhr_context_view
|
||||
login_as(:admin_user)
|
||||
assert_difference 'Todo.count' do
|
||||
put :create, xhr: true, params: {
|
||||
"context_name" => "library",
|
||||
"project_name" => "",
|
||||
"todo" => {
|
||||
"notes" => "",
|
||||
"description" => "Read Warren Buffet's book",
|
||||
"due" => "30/12/2006"
|
||||
},
|
||||
"_source_view" => "context",
|
||||
"default_context_name" => "library",
|
||||
"tag_list" => "bar foo"
|
||||
}
|
||||
assert_response 200
|
||||
end
|
||||
end
|
||||
|
||||
def test_fail_to_create_todo_via_xml
|
||||
login_as(:admin_user)
|
||||
# try to create with no context, which is not valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue