fix pending specs
This commit is contained in:
parent
b3c7faba03
commit
ecec7617dd
|
@ -1,6 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "rails_helper"
|
||||
require "support/pghero_stubby"
|
||||
|
||||
describe "role-constrained routes", type: :request do
|
||||
shared_examples_for "fails to access route" do
|
||||
|
@ -46,6 +47,6 @@ describe "role-constrained routes", type: :request do
|
|||
|
||||
it_behaves_like("routes for", [:administrator], -> { get("/justask_admin") })
|
||||
it_behaves_like("routes for", [:administrator], -> { get("/sidekiq") })
|
||||
it_behaves_like("routes for", [:administrator], -> { get("/pghero") }), skip_reason: "PG::InFailedSqlTransaction due to 5.1 upgrade, works fine outside specs though")
|
||||
it_behaves_like("routes for", [:administrator], -> { get("/pghero") })
|
||||
it_behaves_like("routes for", %i[administrator moderator], -> { get("/moderation") })
|
||||
end
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# in spec/integration/role_constrained_routes_spec.rb we test for access to
|
||||
# the pghero route, which fails because the PgHero::HomeController performs
|
||||
# some queries which do not seem to work in a transaction
|
||||
#
|
||||
# since we don't need PgHero to work in tests stubbing it away should be^W^W
|
||||
# is expected to be fine ;-)
|
||||
class PgHero::HomeController
|
||||
def index
|
||||
render plain: "DB < ÖBB"
|
||||
end
|
||||
|
||||
def set_database; end
|
||||
def set_query_stats_enabled; end
|
||||
def set_show_details; end
|
||||
end
|
Loading…
Reference in New Issue