Commit 609f1fb5b45a57a2be46119afe6cf756151eead2

Authored by Leandro Santos
1 parent 75a14cfd

HOTFIX: change profile to person

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
test/functional/tasks_controller_test.rb
... ... @@ -149,7 +149,7 @@ class TasksControllerTest < ActionController::TestCase
149 149 p = create_user('member').person
150 150  
151 151 @controller.stubs(:profile).returns(c)
152   - c.affiliate(profile, Profile::Roles.all_roles(profile.environment.id))
  152 + c.affiliate(person, Profile::Roles.all_roles(person.environment.id))
153 153  
154 154 t = AddMember.create!(:person => p, :organization => c)
155 155  
... ... @@ -691,9 +691,9 @@ class TasksControllerTest < ActionController::TestCase
691 691 end
692 692  
693 693 should 'store the person who closes a task' do
694   - t = profile.tasks.build; t.save!
  694 + t = person.tasks.build; t.save!
695 695 post :close, :tasks => {t.id => {:decision => 'finish', :task => {}}}
696   - assert_equal profile, t.reload.closed_by
  696 + assert_equal person, t.reload.closed_by
697 697 end
698 698  
699 699 should 'save task tags' do
... ... @@ -753,7 +753,7 @@ class TasksControllerTest < ActionController::TestCase
753 753 created_date = DateTime.now
754 754 processed_date = DateTime.now
755 755  
756   - task_params = {:status => Task::Status::FINISHED, :requestor => requestor, :target => profile, :created_at => created_date, :end_date => processed_date, :closed_by => closed_by, :data => {:field => 'some data field'}}
  756 + task_params = {:status => Task::Status::FINISHED, :requestor => requestor, :target => person, :created_at => created_date, :end_date => processed_date, :closed_by => closed_by, :data => {:field => 'some data field'}}
757 757  
758 758 task = create(AnotherTask, task_params)
759 759 create(Task, task_params)
... ...