From b592907d48f90dbae43fcfb1a96a30cebd14e243 Mon Sep 17 00:00:00 2001
From: Michel Felipe de Oliveira Ferreira
+ <% @params_tags.each do |hidden_tag| %> + + <%= hidden_tag %> + <% end %> +
+ <% end %> + <% button_bar(:class => 'task-actions') do %> <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %> <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %> diff --git a/test/functional/tasks_controller_test.rb b/test/functional/tasks_controller_test.rb index 5d97172..8c5c81a 100644 --- a/test/functional/tasks_controller_test.rb +++ b/test/functional/tasks_controller_test.rb @@ -12,7 +12,7 @@ class TasksControllerTest < ActionController::TestCase @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new - self.profile = create_user('testuser').person + self.profile = create_user('testuser', :email => 'testuser@email.com').person @controller.stubs(:profile).returns(profile) login_as 'testuser' end @@ -77,7 +77,12 @@ class TasksControllerTest < ActionController::TestCase end should 'keep filters after close a task' do - t = profile.tasks.build; t.save! + requestor = User.create!(:login => 'john', :email => 'john@example.com', :password => 'test', :password_confirmation => 'test') + c = Community.create!(:name => 'test comm', :identifier => 'test_comm', :moderated_articles => false) + t = InviteMember.create!(:requestor => requestor.person, :target => profile, :spam => false, :community_id => c.id) + + get :index, :filter_type => t.type + assert_tag_in_string(assigns(:params_tags).join(' '), :tag => 'input', :attributes => { :value => 'InviteMember' }) post :close, :tasks => {t.id => {:decision => 'finish', :task => {}}}, :filter_type => t.type assert_redirected_to :action => 'index', :filter_type => t.type -- libgit2 0.21.2