Commit 1b5eff3388464e5245e32a1599de69c656b600eb

Authored by Leandro Santos
1 parent 99c63eb0

fixing functionals tests

test/functional/categories_controller_test.rb
@@ -32,12 +32,10 @@ class CategoriesControllerTest < ActionController::TestCase @@ -32,12 +32,10 @@ class CategoriesControllerTest < ActionController::TestCase
32 end 32 end
33 33
34 def test_edit 34 def test_edit
35 - cat = Category.new  
36 - env.categories.expects(:find).with('1').returns(cat)  
37 - get :edit, :id => '1' 35 + get :edit, :id => cat1
38 assert_response :success 36 assert_response :success
39 assert_template 'edit' 37 assert_template 'edit'
40 - assert_equal cat, assigns(:category) 38 + assert_equal cat1, assigns(:category)
41 end 39 end
42 40
43 def test_edit_save 41 def test_edit_save
test/functional/tasks_controller_test.rb
@@ -246,6 +246,7 @@ class TasksControllerTest < ActionController::TestCase @@ -246,6 +246,7 @@ class TasksControllerTest < ActionController::TestCase
246 @controller.stubs(:profile).returns(c) 246 @controller.stubs(:profile).returns(c)
247 c.affiliate(profile, Profile::Roles.all_roles(c.environment)) 247 c.affiliate(profile, Profile::Roles.all_roles(c.environment))
248 person = create_user('test_user').person 248 person = create_user('test_user').person
  249 + c.add_member(person)
249 p_blog = Blog.create!(:profile => person, :name => 'Blog') 250 p_blog = Blog.create!(:profile => person, :name => 'Blog')
250 c_blog1 = Blog.create!(:profile => c, :name => 'Blog') 251 c_blog1 = Blog.create!(:profile => c, :name => 'Blog')
251 c_blog2 = Blog.new(:profile => c); c_blog2.name = 'blog2'; c_blog2.save! 252 c_blog2 = Blog.new(:profile => c); c_blog2.name = 'blog2'; c_blog2.save!