-
-
Notifications
You must be signed in to change notification settings - Fork 391
Expand file tree
/
Copy pathdebug_spec.rb
More file actions
35 lines (23 loc) · 711 Bytes
/
debug_spec.rb
File metadata and controls
35 lines (23 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# frozen_string_literal: true
RSpec.describe "admin/debug" do
it "displays debug information" do
login_as(create(:user, admin: true))
visit("/admin/debug")
expect(page).to have_content(RUBY_VERSION)
end
it "shows None when there are no pending migrations" do
login_as(create(:user, admin: true))
visit("/admin/debug")
expect(page).to have_content("None")
end
it "shows the queued jobs count" do
login_as(create(:user, admin: true))
visit("/admin/debug")
expect(page).to have_content("Queued Jobs")
end
it "blocks non-admin users" do
login_as(default_user)
visit("/admin/debug")
expect(page).to have_content("No route matches")
end
end