[#4604] Add the last cache timestamps to the caching admin panel
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
require 'test_helper'
|
||||
|
||||
class AdminPanelTest < ActionController::IntegrationTest
|
||||
include Redmine::I18n
|
||||
|
||||
def setup
|
||||
@last_caching_run = 4.days.ago.to_s
|
||||
@last_cache_clearing_run = 7.days.ago.to_s
|
||||
|
||||
Setting.plugin_redmine_rate = {
|
||||
'last_caching_run' => @last_caching_run,
|
||||
'last_cache_clearing_run' => @last_cache_clearing_run
|
||||
}
|
||||
|
||||
@user = User.generate!(:admin => true, :password => 'rates', :password_confirmation => 'rates')
|
||||
|
||||
login_as(@user.login, 'rates')
|
||||
@@ -18,8 +28,26 @@ class AdminPanelTest < ActionController::IntegrationTest
|
||||
|
||||
end
|
||||
|
||||
should "show the last run timestamp for the last caching run"
|
||||
should "show the last run timestamp for the last cache clearing run"
|
||||
should "show the last run timestamp for the last caching run" do
|
||||
click_link "Administration"
|
||||
click_link "Rate Caches"
|
||||
|
||||
assert_select '#caching-run' do
|
||||
assert_select 'p', :text => /#{format_time(@last_caching_run)}/
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
should "show the last run timestamp for the last cache clearing run" do
|
||||
click_link "Administration"
|
||||
click_link "Rate Caches"
|
||||
|
||||
assert_select '#cache-clearing-run' do
|
||||
assert_select 'p', :text => /#{format_time(@last_cache_clearing_run)}/
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
should "have a button to force a caching run"
|
||||
should "have a button to force a cache clearing run"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user