From 67e0d5160966dd7db885adf559aae5c0a0397472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Fri, 22 Nov 2024 10:58:52 +0100 Subject: [PATCH] #61 tests --- .github/workflows/rubyonrails.yml | 2 +- test/functional/account_controller_test.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index 3eaff09..9e11214 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -41,7 +41,7 @@ jobs: svn export https://svn.redmine.org/redmine/branches/6.0-stable/ /opt/redmine sed -i "s/gem 'net-imap'/#gem 'net-imap'/" /opt/redmine/Gemfile - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Link the plugin # Link the plugin to the redmine folder run: | diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 9c28e87..ab868b6 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -35,15 +35,16 @@ def test_login assert_response :success end - def test_logout_oauth + def test_logout post '/login', params: { username: 'jsmith', password: 'jsmith' } Setting.plugin_redmine_oauth[:oauth_logout] = '' post '/logout' assert_redirected_to home_path end - def test_logout + def test_logout_oauth post '/login', params: { username: 'jsmith', password: 'jsmith' } + cookies[:oauth_login] = true Setting.plugin_redmine_oauth[:oauth_logout] = '1' site = 'https://login.microsoftonline.com' Setting.plugin_redmine_oauth[:site] = site