mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FEATURE: display out of date themes on admin dashboard
* FEATURE: disaply out of date themes on admin dashboard * Update copy
This commit is contained in:
@ -336,4 +336,19 @@ describe AdminDashboardData do
|
||||
end
|
||||
end
|
||||
|
||||
describe '#out_of_date_themes' do
|
||||
let(:remote) { RemoteTheme.create!(remote_url: "https://github.com/org/testtheme") }
|
||||
let!(:theme) { Theme.create!(remote_theme_id: remote.id, name: "Test< Theme", user_id: -1) }
|
||||
|
||||
it "outputs correctly formatted html" do
|
||||
remote.update!(local_version: "old version", remote_version: "new version", commits_behind: 2)
|
||||
dashboard_data = described_class.new
|
||||
expect(dashboard_data.out_of_date_themes).to eq(
|
||||
I18n.t("dashboard.out_of_date_themes") + "<ul><li><a href=\"/admin/customize/themes/#{theme.id}\">Test< Theme</a></li></ul>"
|
||||
)
|
||||
|
||||
remote.update!(local_version: "new version", commits_behind: 0)
|
||||
expect(dashboard_data.out_of_date_themes).to eq(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user