mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 10:40:13 +01:00
move tests to new directory
This commit is contained in:
parent
65859807ea
commit
0bc9b0397a
42 changed files with 23 additions and 32 deletions
22
test/models/project_from_todo_test.rb
Normal file
22
test/models/project_from_todo_test.rb
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
require_relative '../test_helper'
|
||||
require_relative '../../lib/project_from_todo'
|
||||
|
||||
class ProjectFromTodoTest < ActiveSupport::TestCase
|
||||
fixtures :todos
|
||||
|
||||
def test_create_project_from_valid_todo
|
||||
todo = todos(:upgrade_rails)
|
||||
project = ProjectFromTodo.new(todo).create
|
||||
assert_equal project.name, todo.description
|
||||
assert_equal project.description, todo.notes
|
||||
assert_equal project.default_context, todo.context
|
||||
end
|
||||
|
||||
def test_invalid_project_from_invalid_todo
|
||||
todo = todos(:upgrade_rails)
|
||||
todo.description = ""
|
||||
project = ProjectFromTodo.new(todo).create
|
||||
assert_not_nil project
|
||||
assert_equal false, project.valid?
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue