Files
fizzy/saas/test/controllers/admin/stats_controller_test.rb
T
Jorge Manrubia 984a5dd4ce Add Stripe-based billing system
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Jason Zimdars <jz@37signals.com>
2025-12-16 12:00:23 +01:00

28 lines
466 B
Ruby

require "test_helper"
class Admin::StatsControllerTest < ActionDispatch::IntegrationTest
def saas
Fizzy::Saas::Engine.routes.url_helpers
end
test "staff can access stats" do
sign_in_as :david
untenanted do
get saas.admin_stats_path
end
assert_response :success
end
test "non-staff cannot access stats" do
sign_in_as :jz
untenanted do
get saas.admin_stats_path
end
assert_response :forbidden
end
end