diff --git a/app/helpers/spree/admin/base_helper.rb b/app/helpers/spree/admin/base_helper.rb index ad054c383f..85c0f7b791 100644 --- a/app/helpers/spree/admin/base_helper.rb +++ b/app/helpers/spree/admin/base_helper.rb @@ -287,8 +287,12 @@ def taxon_wysiwyg_editor_enabled? Spree::Backend::Config[:taxon_wysiwyg_editor_enabled] end + def spree_admin_show_version? + can?(:admin, current_store) && Spree::Backend::RuntimeConfig[:admin_show_version] + end + def spree_update_available? - @spree_update_available ||= Spree::Admin::Updater.update_available? + @spree_update_available ||= !Rails.env.test? && Spree::Admin::Updater.update_available? end end end diff --git a/app/views/spree/admin/shared/_version.html.erb b/app/views/spree/admin/shared/_version.html.erb index 7c5795940d..ce6eb71b1e 100644 --- a/app/views/spree/admin/shared/_version.html.erb +++ b/app/views/spree/admin/shared/_version.html.erb @@ -1,10 +1,10 @@ -<% if can?(:admin, current_store) && Spree::Backend::RuntimeConfig[:admin_show_version] %> +<% if spree_admin_show_version? %>