Skip to content

Commit

Permalink
Add part of test for TaskTemplatesController#update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoliy Lysenko committed Mar 8, 2010
1 parent 10f453a commit f1b58a3
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions test/functional/task_templates_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,32 @@ def setup
end
end
context 'when update task tamplate' do
setup do
@template = Template.first
@template.work_logs.clear
@parameters={ :id=>@template.id,
:task=>{ :id=>@template.id, :name=>@template.name + '!!update!!', :description=> @template.description+'!!update!!'}
}
post(:update, @parameters)
@template.reload
end
should 'change attributes' do
assert_equal @parameters[:task][:name], @template.name
assert_equal @parameters[:task][:description], @template.description
end
should 'change custom property values' do
end
should 'add todo' do
should 'change todos' do
end
should 'remove todo' do
should 'change users' do
end
should 'add users' do
should 'change clients' do
end
should 'remove users' do
should 'not add any dependecies' do
assert_equal 0, @template.dependencies.size
end
should 'add client' do
end
should 'remove client' do
end
should 'can not add any dependecies' do
end
should 'can not add any worklogs' do
should 'not add any worklogs' do
assert_equal 0, @template.work_logs.size
end
end
context 'when create task from given template' do
Expand Down

0 comments on commit f1b58a3

Please sign in to comment.