aboutsummaryrefslogtreecommitdiff
path: root/test/system/sessions_test.rb
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2024-03-15 23:14:43 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2024-03-15 23:14:43 +0100
commit1e6bf953680bf03d4b797cf9b8f7235546b2c578 (patch)
tree454618355052363631d6fff280ae94df3b9d5929 /test/system/sessions_test.rb
parent87c3ff44381d270f3a4f4c384f674f85a7f178a1 (diff)
downloadoperum-1e6bf953680bf03d4b797cf9b8f7235546b2c578.tar.gz
operum-1e6bf953680bf03d4b797cf9b8f7235546b2c578.zip
Ensure that the last search is honored
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'test/system/sessions_test.rb')
-rw-r--r--test/system/sessions_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/system/sessions_test.rb b/test/system/sessions_test.rb
index 2d01eef..6722de0 100644
--- a/test/system/sessions_test.rb
+++ b/test/system/sessions_test.rb
@@ -24,4 +24,17 @@ class SessionsTest < ApplicationSystemTestCase
assert_text I18n.t('sessions.title')
end
+
+ test 'keeps the last search on sign in' do
+ sign_in!
+
+ assert_equal current_url, root_url
+
+ click_on searches(:search1).name
+ click_on I18n.t('sessions.sign-out')
+
+ sign_in!
+
+ assert_equal current_url, search_url(searches(:search1))
+ end
end