mirror of
https://github.com/we-promise/sure.git
synced 2026-04-10 07:44:48 +00:00
fix: Don't show Billings on settings navbar when self-hosted (#1912)
* Do not show billing settings navbar item when self hosted * Do not show billing settings navbar item when self hosted * Add condition to settings helper * Let Stripe::AuthenticationError bubble up
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
require "test_helper"
|
||||
|
||||
class SubscriptionsControllerTest < ActionDispatch::IntegrationTest
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
setup do
|
||||
sign_in @user = users(:family_admin)
|
||||
end
|
||||
|
||||
test "redirects to settings if self hosting" do
|
||||
Rails.application.config.app_mode.stubs(:self_hosted?).returns(true)
|
||||
get subscription_path
|
||||
assert_redirected_to root_path
|
||||
assert_equal I18n.t("subscriptions.self_hosted_alert"), flash[:alert]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user