forked from resque/resque
-
Notifications
You must be signed in to change notification settings - Fork 1
/
resque-web_test.rb
54 lines (39 loc) · 931 Bytes
/
resque-web_test.rb
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require File.dirname(__FILE__) + '/test_helper'
require 'resque/server/test_helper'
# Root path test
context "on GET to /" do
setup { get "/" }
test "redirect to overview" do
follow_redirect!
end
end
# Global overview
context "on GET to /overview" do
setup { get "/overview" }
test "should at least display 'queues'" do
assert last_response.body.include?('Queues')
end
end
# Working jobs
context "on GET to /working" do
setup { get "/working" }
should_respond_with_success
end
# Failed
context "on GET to /failed" do
setup { get "/failed" }
should_respond_with_success
end
# Stats
context "on GET to /stats/resque" do
setup { get "/stats/resque" }
should_respond_with_success
end
context "on GET to /stats/redis" do
setup { get "/stats/redis" }
should_respond_with_success
end
context "on GET to /stats/resque" do
setup { get "/stats/keys" }
should_respond_with_success
end