From c8fc45c21d72837d5a6bd41ffca18b3ac52a305f Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 5 Jul 2014 12:49:44 +0200 Subject: stay on all tickets view when sorting (#5879) When an admin sorted the tickets view in a different order it would take them to their own tickets list before --- engines/support/test/integration/navigation_test.rb | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'engines/support/test/integration') diff --git a/engines/support/test/integration/navigation_test.rb b/engines/support/test/integration/navigation_test.rb index eec8c0e..1cf5825 100644 --- a/engines/support/test/integration/navigation_test.rb +++ b/engines/support/test/integration/navigation_test.rb @@ -1,9 +1,20 @@ require 'test_helper' -class NavigationTest < ActionDispatch::IntegrationTest +class NavigationTest < BrowserIntegrationTest - # test "the truth" do - # assert true - # end + # + # this is a regression test for #5879 + # + test "admin can navigate all tickets" do + login + with_config admins: [@user.login] do + visit '/' + click_on 'Tickets' + click_on 'Created at' + uri = URI.parse(current_url) + assert_equal '/tickets', uri.path + assert_equal 'open_status=open&sort_order=created_at_desc', uri.query + end + end end -- cgit v1.2.3 From 9d83092405745f6d1b07a57fd8d2aa8e9bffd9fa Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 5 Jul 2014 13:10:50 +0200 Subject: minor: cleanup some links only submit the params that differ from the defaults --- engines/support/test/integration/navigation_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/support/test/integration') diff --git a/engines/support/test/integration/navigation_test.rb b/engines/support/test/integration/navigation_test.rb index 1cf5825..13d51b6 100644 --- a/engines/support/test/integration/navigation_test.rb +++ b/engines/support/test/integration/navigation_test.rb @@ -13,7 +13,7 @@ class NavigationTest < BrowserIntegrationTest click_on 'Created at' uri = URI.parse(current_url) assert_equal '/tickets', uri.path - assert_equal 'open_status=open&sort_order=created_at_desc', uri.query + assert_equal 'sort_order=created_at_desc', uri.query end end end -- cgit v1.2.3