resque-approve 0.0.7 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -67,6 +67,14 @@ RSpec.describe Resque::Plugins::Approve do
67
67
  expect(BasicJob.auto_delete_approval_key).to be_falsey
68
68
  end
69
69
 
70
+ it "has max_active_jobs" do
71
+ expect(BasicJob.max_active_jobs).to eq(-1)
72
+ end
73
+
74
+ it "has default_queue_name" do
75
+ expect(BasicJob.default_queue_name).to eq "Some_Queue"
76
+ end
77
+
70
78
  it "does not delay jobs that are enqueued without delay args" do
71
79
  Resque.enqueue BasicJob, *test_args_with_hash
72
80
 
@@ -198,4 +206,49 @@ RSpec.describe Resque::Plugins::Approve do
198
206
  expect { BasicJob.before_enqueue_approve(*test_args_with_hash_approve) }.not_to(change { test_args_with_hash })
199
207
  end
200
208
  end
209
+
210
+ describe "approval methods" do
211
+ let(:pending_job_queue) do
212
+ instance_double(Resque::Plugins::Approve::PendingJobQueue,
213
+ approve_all: nil,
214
+ approve_one: nil,
215
+ approve_num: nil,
216
+ remove_all: nil,
217
+ remove_one: nil)
218
+ end
219
+
220
+ before(:each) do
221
+ allow(Resque::Plugins::Approve::PendingJobQueue).to receive(:new).with("Some_Queue").and_return pending_job_queue
222
+ end
223
+
224
+ it "responds to approve" do
225
+ BasicJob.approve
226
+
227
+ expect(pending_job_queue).to have_received(:approve_all)
228
+ end
229
+
230
+ it "responds to approve_one" do
231
+ BasicJob.approve_one
232
+
233
+ expect(pending_job_queue).to have_received(:approve_one)
234
+ end
235
+
236
+ it "responds to approve_one" do
237
+ BasicJob.approve_num 12
238
+
239
+ expect(pending_job_queue).to have_received(:approve_num).with(12)
240
+ end
241
+
242
+ it "responds to remove" do
243
+ BasicJob.remove
244
+
245
+ expect(pending_job_queue).to have_received(:remove_all)
246
+ end
247
+
248
+ it "responds to remove_one" do
249
+ BasicJob.remove_one
250
+
251
+ expect(pending_job_queue).to have_received(:remove_one)
252
+ end
253
+ end
201
254
  end
@@ -1,154 +1,184 @@
1
1
  example_id | status | run_time |
2
2
  ---------------------------------------------------- | ------ | --------------- |
3
- ./spec/approve/approval_key_list_spec.rb[1:1:1] | passed | 0.00065 seconds |
4
- ./spec/approve/approval_key_list_spec.rb[1:1:2] | passed | 0.00061 seconds |
5
- ./spec/approve/approval_key_list_spec.rb[1:1:3] | passed | 0.00082 seconds |
6
- ./spec/approve/approval_key_list_spec.rb[1:2:1] | passed | 0.00341 seconds |
7
- ./spec/approve/approval_key_list_spec.rb[1:2:2] | passed | 0.00285 seconds |
8
- ./spec/approve/approval_key_list_spec.rb[1:3:1] | passed | 0.00392 seconds |
9
- ./spec/approve/approval_key_list_spec.rb[1:3:2] | passed | 0.00344 seconds |
10
- ./spec/approve/approval_key_list_spec.rb[1:4:1] | passed | 0.00353 seconds |
11
- ./spec/approve/approval_key_list_spec.rb[1:4:2] | passed | 0.00418 seconds |
12
- ./spec/approve/approval_key_list_spec.rb[1:4:3] | passed | 0.00469 seconds |
13
- ./spec/approve/approval_key_list_spec.rb[1:5:1] | passed | 0.01647 seconds |
14
- ./spec/approve/approval_key_list_spec.rb[1:5:2] | passed | 0.01535 seconds |
15
- ./spec/approve/approval_key_list_spec.rb[1:5:3] | passed | 0.01722 seconds |
16
- ./spec/approve/approval_key_list_spec.rb[1:6:1] | passed | 0.03028 seconds |
17
- ./spec/approve/approval_key_list_spec.rb[1:6:2] | passed | 0.03413 seconds |
18
- ./spec/approve/approval_key_list_spec.rb[1:6:3] | passed | 0.02611 seconds |
19
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:1] | passed | 0.36544 seconds |
20
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:2] | passed | 0.36501 seconds |
21
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:3] | passed | 0.36918 seconds |
22
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:4] | passed | 0.37606 seconds |
23
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:5] | passed | 0.36544 seconds |
24
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:6] | passed | 0.40812 seconds |
25
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:7] | passed | 0.36672 seconds |
26
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:1] | passed | 0.37991 seconds |
27
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:2] | passed | 0.36669 seconds |
28
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:3] | passed | 0.43722 seconds |
29
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:4] | passed | 0.36765 seconds |
30
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:5] | passed | 0.36732 seconds |
31
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:6] | passed | 0.36935 seconds |
32
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:7] | passed | 0.36613 seconds |
33
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:1] | passed | 0.37502 seconds |
34
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:2] | passed | 0.40802 seconds |
35
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:3] | passed | 0.45935 seconds |
36
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:4] | passed | 0.39677 seconds |
37
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:5] | passed | 0.37578 seconds |
38
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:6] | passed | 0.37948 seconds |
39
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:7] | passed | 0.42084 seconds |
40
- ./spec/approve/approval_key_list_spec.rb[1:8:1] | passed | 0.0291 seconds |
41
- ./spec/approve/approval_key_list_spec.rb[1:9:1] | passed | 0.0271 seconds |
42
- ./spec/approve/cleaner_spec.rb[1:1:1] | passed | 0.01088 seconds |
43
- ./spec/approve/cleaner_spec.rb[1:1:2] | passed | 0.00925 seconds |
44
- ./spec/approve/cleaner_spec.rb[1:1:3] | passed | 0.00928 seconds |
45
- ./spec/approve/cleaner_spec.rb[1:2:1] | passed | 0.01394 seconds |
46
- ./spec/approve/cleaner_spec.rb[1:2:2] | passed | 0.01468 seconds |
47
- ./spec/approve/cleaner_spec.rb[1:3:1] | passed | 0.62419 seconds |
48
- ./spec/approve/pending_job_queue_spec.rb[1:1:1] | passed | 0.00832 seconds |
49
- ./spec/approve/pending_job_queue_spec.rb[1:1:2] | passed | 0.00693 seconds |
50
- ./spec/approve/pending_job_queue_spec.rb[1:1:3] | passed | 0.0068 seconds |
51
- ./spec/approve/pending_job_queue_spec.rb[1:1:4] | passed | 0.00753 seconds |
52
- ./spec/approve/pending_job_queue_spec.rb[1:1:5:1] | passed | 0.00851 seconds |
53
- ./spec/approve/pending_job_queue_spec.rb[1:2:1] | passed | 0.00622 seconds |
54
- ./spec/approve/pending_job_queue_spec.rb[1:2:2] | passed | 0.0133 seconds |
55
- ./spec/approve/pending_job_queue_spec.rb[1:3:1] | passed | 0.00683 seconds |
56
- ./spec/approve/pending_job_queue_spec.rb[1:3:2] | passed | 0.00681 seconds |
57
- ./spec/approve/pending_job_queue_spec.rb[1:4:1] | passed | 0.01019 seconds |
58
- ./spec/approve/pending_job_queue_spec.rb[1:4:2] | passed | 0.0078 seconds |
59
- ./spec/approve/pending_job_queue_spec.rb[1:5:1] | passed | 0.00691 seconds |
60
- ./spec/approve/pending_job_queue_spec.rb[1:5:2] | passed | 0.00617 seconds |
61
- ./spec/approve/pending_job_queue_spec.rb[1:6:1] | passed | 0.01194 seconds |
62
- ./spec/approve/pending_job_queue_spec.rb[1:6:2] | passed | 0.00553 seconds |
63
- ./spec/approve/pending_job_queue_spec.rb[1:7:1] | passed | 0.00679 seconds |
64
- ./spec/approve/pending_job_queue_spec.rb[1:7:2] | passed | 0.00784 seconds |
65
- ./spec/approve/pending_job_queue_spec.rb[1:8:1] | passed | 0.00923 seconds |
66
- ./spec/approve/pending_job_queue_spec.rb[1:8:2] | passed | 0.00721 seconds |
67
- ./spec/approve/pending_job_queue_spec.rb[1:9:1] | passed | 0.00706 seconds |
68
- ./spec/approve/pending_job_queue_spec.rb[1:9:2] | passed | 0.00727 seconds |
69
- ./spec/approve/pending_job_queue_spec.rb[1:10:1] | passed | 0.00732 seconds |
70
- ./spec/approve/pending_job_queue_spec.rb[1:10:2] | passed | 0.00797 seconds |
71
- ./spec/approve/pending_job_queue_spec.rb[1:11:1] | passed | 0.02497 seconds |
72
- ./spec/approve/pending_job_queue_spec.rb[1:11:2] | passed | 0.02136 seconds |
73
- ./spec/approve/pending_job_queue_spec.rb[1:11:3] | passed | 0.02322 seconds |
74
- ./spec/approve/pending_job_queue_spec.rb[1:11:4] | passed | 0.02569 seconds |
75
- ./spec/approve/pending_job_queue_spec.rb[1:11:5] | passed | 0.02964 seconds |
76
- ./spec/approve/pending_job_queue_spec.rb[1:12:1] | passed | 0.00406 seconds |
77
- ./spec/approve/pending_job_queue_spec.rb[1:13:1] | passed | 0.00883 seconds |
78
- ./spec/approve/pending_job_queue_spec.rb[1:14:1] | passed | 0.00442 seconds |
79
- ./spec/approve/pending_job_queue_spec.rb[1:14:2] | passed | 0.00618 seconds |
80
- ./spec/approve/pending_job_queue_spec.rb[1:14:3] | passed | 0.00669 seconds |
81
- ./spec/approve/pending_job_queue_spec.rb[1:14:4] | passed | 0.00742 seconds |
82
- ./spec/approve/pending_job_spec.rb[1:1:1] | passed | 0.00232 seconds |
83
- ./spec/approve/pending_job_spec.rb[1:1:2] | passed | 0.0026 seconds |
84
- ./spec/approve/pending_job_spec.rb[1:1:3] | passed | 0.00263 seconds |
85
- ./spec/approve/pending_job_spec.rb[1:1:4] | passed | 0.00252 seconds |
86
- ./spec/approve/pending_job_spec.rb[1:1:5] | passed | 0.00204 seconds |
87
- ./spec/approve/pending_job_spec.rb[1:1:6] | passed | 0.00223 seconds |
88
- ./spec/approve/pending_job_spec.rb[1:1:7] | passed | 0.00505 seconds |
89
- ./spec/approve/pending_job_spec.rb[1:2:1] | passed | 0.00301 seconds |
90
- ./spec/approve/pending_job_spec.rb[1:2:2] | passed | 0.00125 seconds |
91
- ./spec/approve/pending_job_spec.rb[1:2:3] | passed | 0.00139 seconds |
92
- ./spec/approve/pending_job_spec.rb[1:2:4] | passed | 0.0013 seconds |
93
- ./spec/approve/pending_job_spec.rb[1:2:5] | passed | 0.0014 seconds |
94
- ./spec/approve/pending_job_spec.rb[1:3:1:1] | passed | 0.00395 seconds |
95
- ./spec/approve/pending_job_spec.rb[1:3:1:2] | passed | 0.00271 seconds |
96
- ./spec/approve/pending_job_spec.rb[1:3:1:3] | passed | 0.00283 seconds |
97
- ./spec/approve/pending_job_spec.rb[1:3:1:4] | passed | 0.00284 seconds |
98
- ./spec/approve/pending_job_spec.rb[1:3:1:5] | passed | 0.00269 seconds |
99
- ./spec/approve/pending_job_spec.rb[1:3:1:6] | passed | 0.00298 seconds |
100
- ./spec/approve/pending_job_spec.rb[1:3:1:7] | passed | 0.00381 seconds |
101
- ./spec/approve/pending_job_spec.rb[1:4:1:1] | passed | 0.00387 seconds |
102
- ./spec/approve/pending_job_spec.rb[1:4:1:2] | passed | 0.00338 seconds |
103
- ./spec/approve/pending_job_spec.rb[1:4:1:3] | passed | 0.04452 seconds |
104
- ./spec/approve/pending_job_spec.rb[1:4:1:4] | passed | 0.00558 seconds |
105
- ./spec/approve/pending_job_spec.rb[1:4:1:5] | passed | 0.0032 seconds |
106
- ./spec/approve/pending_job_spec.rb[1:4:1:6] | passed | 0.00334 seconds |
107
- ./spec/approve/pending_job_spec.rb[1:4:1:7] | passed | 0.00329 seconds |
108
- ./spec/approve/pending_job_spec.rb[1:5:1] | passed | 0.00257 seconds |
109
- ./spec/approve/pending_job_spec.rb[1:6:1] | passed | 0.00731 seconds |
110
- ./spec/approve/pending_job_spec.rb[1:7:1] | passed | 0.00283 seconds |
111
- ./spec/approve/pending_job_spec.rb[1:7:2] | passed | 0.00351 seconds |
112
- ./spec/approve/pending_job_spec.rb[1:7:3] | passed | 0.00398 seconds |
113
- ./spec/approve/pending_job_spec.rb[1:8:1] | passed | 0.00586 seconds |
114
- ./spec/approve/pending_job_spec.rb[1:8:2] | passed | 0.00253 seconds |
115
- ./spec/approve/pending_job_spec.rb[1:8:3] | passed | 0.00232 seconds |
116
- ./spec/approve/pending_job_spec.rb[1:8:4] | passed | 0.00316 seconds |
117
- ./spec/approve/pending_job_spec.rb[1:8:5] | passed | 0.00275 seconds |
118
- ./spec/approve_spec.rb[1:1] | passed | 0.00134 seconds |
119
- ./spec/approve_spec.rb[1:2] | passed | 0.00357 seconds |
120
- ./spec/approve_spec.rb[1:3] | passed | 0.00338 seconds |
121
- ./spec/approve_spec.rb[1:4] | passed | 0.00374 seconds |
122
- ./spec/approve_spec.rb[1:5] | passed | 0.00359 seconds |
123
- ./spec/approve_spec.rb[1:6:1] | passed | 0.00412 seconds |
124
- ./spec/approve_spec.rb[1:6:2] | passed | 0.005 seconds |
125
- ./spec/approve_spec.rb[1:6:3] | passed | 0.00729 seconds |
126
- ./spec/approve_spec.rb[1:6:4] | passed | 0.00768 seconds |
127
- ./spec/approve_spec.rb[1:6:5] | passed | 0.00538 seconds |
128
- ./spec/approve_spec.rb[1:6:6] | passed | 0.00662 seconds |
129
- ./spec/approve_spec.rb[1:7:1] | passed | 0.00333 seconds |
130
- ./spec/approve_spec.rb[1:7:2] | passed | 0.00519 seconds |
131
- ./spec/approve_spec.rb[1:8:1] | passed | 0.00296 seconds |
132
- ./spec/approve_spec.rb[1:8:2] | passed | 0.00583 seconds |
133
- ./spec/server/public/approve.css_spec.rb[1:1] | passed | 0.0762 seconds |
134
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:1] | passed | 0.01063 seconds |
135
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:2] | passed | 0.01043 seconds |
136
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:3] | passed | 0.01513 seconds |
137
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:4] | passed | 0.01159 seconds |
138
- ./spec/server/views/approval_keys.erb_spec.rb[1:2] | passed | 0.02721 seconds |
139
- ./spec/server/views/approval_keys.erb_spec.rb[1:3] | passed | 0.02125 seconds |
140
- ./spec/server/views/job_details.erb_spec.rb[1:1] | passed | 0.04979 seconds |
141
- ./spec/server/views/job_details.erb_spec.rb[1:2] | passed | 0.00831 seconds |
142
- ./spec/server/views/job_details.erb_spec.rb[1:3] | passed | 0.01073 seconds |
143
- ./spec/server/views/job_details.erb_spec.rb[1:4] | passed | 0.01444 seconds |
144
- ./spec/server/views/job_details.erb_spec.rb[1:5] | passed | 0.01052 seconds |
145
- ./spec/server/views/job_details.erb_spec.rb[1:6] | passed | 0.01214 seconds |
146
- ./spec/server/views/job_list.erb_spec.rb[1:1:1] | passed | 0.01091 seconds |
147
- ./spec/server/views/job_list.erb_spec.rb[1:1:2] | passed | 0.00942 seconds |
148
- ./spec/server/views/job_list.erb_spec.rb[1:1:3] | passed | 0.01471 seconds |
149
- ./spec/server/views/job_list.erb_spec.rb[1:1:4] | passed | 0.00958 seconds |
150
- ./spec/server/views/job_list.erb_spec.rb[1:1:5] | passed | 0.00849 seconds |
151
- ./spec/server/views/job_list.erb_spec.rb[1:1:6] | passed | 0.0096 seconds |
152
- ./spec/server/views/job_list.erb_spec.rb[1:2] | passed | 0.02101 seconds |
153
- ./spec/server/views/job_list.erb_spec.rb[1:3] | passed | 0.02197 seconds |
154
- ./spec/server/views/job_list.erb_spec.rb[1:4] | passed | 0.01921 seconds |
3
+ ./spec/approve/approval_key_list_spec.rb[1:1:1] | passed | 0.00363 seconds |
4
+ ./spec/approve/approval_key_list_spec.rb[1:1:2] | passed | 0.00185 seconds |
5
+ ./spec/approve/approval_key_list_spec.rb[1:1:3] | passed | 0.00256 seconds |
6
+ ./spec/approve/approval_key_list_spec.rb[1:2:1] | passed | 0.00843 seconds |
7
+ ./spec/approve/approval_key_list_spec.rb[1:2:2] | passed | 0.01238 seconds |
8
+ ./spec/approve/approval_key_list_spec.rb[1:3:1] | passed | 0.01383 seconds |
9
+ ./spec/approve/approval_key_list_spec.rb[1:3:2] | passed | 0.00701 seconds |
10
+ ./spec/approve/approval_key_list_spec.rb[1:4:1] | passed | 0.01816 seconds |
11
+ ./spec/approve/approval_key_list_spec.rb[1:4:2] | passed | 0.01489 seconds |
12
+ ./spec/approve/approval_key_list_spec.rb[1:4:3] | passed | 0.01976 seconds |
13
+ ./spec/approve/approval_key_list_spec.rb[1:5:1] | passed | 0.08202 seconds |
14
+ ./spec/approve/approval_key_list_spec.rb[1:5:2] | passed | 0.04583 seconds |
15
+ ./spec/approve/approval_key_list_spec.rb[1:5:3] | passed | 0.06547 seconds |
16
+ ./spec/approve/approval_key_list_spec.rb[1:6:1] | passed | 0.09065 seconds |
17
+ ./spec/approve/approval_key_list_spec.rb[1:6:2] | passed | 0.07597 seconds |
18
+ ./spec/approve/approval_key_list_spec.rb[1:6:3] | passed | 0.07174 seconds |
19
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:1] | passed | 0.63959 seconds |
20
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:2] | passed | 0.53517 seconds |
21
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:3] | passed | 0.53802 seconds |
22
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:4] | passed | 0.61279 seconds |
23
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:5] | passed | 0.56026 seconds |
24
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:6] | passed | 0.57192 seconds |
25
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:7] | passed | 0.57605 seconds |
26
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:1] | passed | 0.72624 seconds |
27
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:2] | passed | 0.65524 seconds |
28
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:3] | passed | 0.58946 seconds |
29
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:4] | passed | 0.70341 seconds |
30
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:5] | passed | 0.65015 seconds |
31
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:6] | passed | 0.67996 seconds |
32
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:7] | passed | 0.63867 seconds |
33
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:1] | passed | 0.61118 seconds |
34
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:2] | passed | 0.63533 seconds |
35
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:3] | passed | 1.42 seconds |
36
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:4] | passed | 1.57 seconds |
37
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:5] | passed | 0.68826 seconds |
38
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:6] | passed | 0.57948 seconds |
39
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:7] | passed | 0.65452 seconds |
40
+ ./spec/approve/approval_key_list_spec.rb[1:8:1] | passed | 0.11153 seconds |
41
+ ./spec/approve/approval_key_list_spec.rb[1:9:1] | passed | 0.13063 seconds |
42
+ ./spec/approve/cleaner_spec.rb[1:1:1] | passed | 0.04201 seconds |
43
+ ./spec/approve/cleaner_spec.rb[1:1:2] | passed | 0.04442 seconds |
44
+ ./spec/approve/cleaner_spec.rb[1:1:3] | passed | 0.04358 seconds |
45
+ ./spec/approve/cleaner_spec.rb[1:2:1] | passed | 0.04751 seconds |
46
+ ./spec/approve/cleaner_spec.rb[1:2:2] | passed | 0.05559 seconds |
47
+ ./spec/approve/cleaner_spec.rb[1:3:1] | passed | 0.03363 seconds |
48
+ ./spec/approve/pending_job_queue_spec.rb[1:1:1] | passed | 0.02645 seconds |
49
+ ./spec/approve/pending_job_queue_spec.rb[1:1:2] | passed | 0.04192 seconds |
50
+ ./spec/approve/pending_job_queue_spec.rb[1:1:3] | passed | 0.02623 seconds |
51
+ ./spec/approve/pending_job_queue_spec.rb[1:1:4] | passed | 0.04295 seconds |
52
+ ./spec/approve/pending_job_queue_spec.rb[1:1:5:1] | passed | 0.03276 seconds |
53
+ ./spec/approve/pending_job_queue_spec.rb[1:2:1] | passed | 0.03304 seconds |
54
+ ./spec/approve/pending_job_queue_spec.rb[1:2:2] | passed | 0.0541 seconds |
55
+ ./spec/approve/pending_job_queue_spec.rb[1:3:1] | passed | 0.04599 seconds |
56
+ ./spec/approve/pending_job_queue_spec.rb[1:3:2] | passed | 0.0332 seconds |
57
+ ./spec/approve/pending_job_queue_spec.rb[1:4:1] | passed | 0.0525 seconds |
58
+ ./spec/approve/pending_job_queue_spec.rb[1:4:2] | passed | 0.03186 seconds |
59
+ ./spec/approve/pending_job_queue_spec.rb[1:5:1] | passed | 0.04638 seconds |
60
+ ./spec/approve/pending_job_queue_spec.rb[1:5:2] | passed | 0.03618 seconds |
61
+ ./spec/approve/pending_job_queue_spec.rb[1:6:1] | passed | 0.06504 seconds |
62
+ ./spec/approve/pending_job_queue_spec.rb[1:6:2] | passed | 0.02601 seconds |
63
+ ./spec/approve/pending_job_queue_spec.rb[1:7:1] | passed | 0.03048 seconds |
64
+ ./spec/approve/pending_job_queue_spec.rb[1:7:2] | passed | 0.03403 seconds |
65
+ ./spec/approve/pending_job_queue_spec.rb[1:8:1] | passed | 0.04451 seconds |
66
+ ./spec/approve/pending_job_queue_spec.rb[1:8:2] | passed | 0.04001 seconds |
67
+ ./spec/approve/pending_job_queue_spec.rb[1:9:1] | passed | 0.02914 seconds |
68
+ ./spec/approve/pending_job_queue_spec.rb[1:9:2] | passed | 0.02514 seconds |
69
+ ./spec/approve/pending_job_queue_spec.rb[1:10:1] | passed | 0.04461 seconds |
70
+ ./spec/approve/pending_job_queue_spec.rb[1:10:2] | passed | 0.04321 seconds |
71
+ ./spec/approve/pending_job_queue_spec.rb[1:11:1] | passed | 0.08921 seconds |
72
+ ./spec/approve/pending_job_queue_spec.rb[1:11:2] | passed | 0.10265 seconds |
73
+ ./spec/approve/pending_job_queue_spec.rb[1:11:3] | passed | 0.10044 seconds |
74
+ ./spec/approve/pending_job_queue_spec.rb[1:11:4] | passed | 0.05359 seconds |
75
+ ./spec/approve/pending_job_queue_spec.rb[1:11:5] | passed | 0.08062 seconds |
76
+ ./spec/approve/pending_job_queue_spec.rb[1:12:1] | passed | 0.03024 seconds |
77
+ ./spec/approve/pending_job_queue_spec.rb[1:13:1] | passed | 0.03646 seconds |
78
+ ./spec/approve/pending_job_queue_spec.rb[1:14:1] | passed | 0.0322 seconds |
79
+ ./spec/approve/pending_job_queue_spec.rb[1:14:2] | passed | 0.02765 seconds |
80
+ ./spec/approve/pending_job_queue_spec.rb[1:14:3] | passed | 0.03866 seconds |
81
+ ./spec/approve/pending_job_queue_spec.rb[1:14:4] | passed | 0.04029 seconds |
82
+ ./spec/approve/pending_job_spec.rb[1:1:1] | passed | 0.01434 seconds |
83
+ ./spec/approve/pending_job_spec.rb[1:1:2] | passed | 0.00994 seconds |
84
+ ./spec/approve/pending_job_spec.rb[1:1:3] | passed | 0.01629 seconds |
85
+ ./spec/approve/pending_job_spec.rb[1:1:4] | passed | 0.01674 seconds |
86
+ ./spec/approve/pending_job_spec.rb[1:1:5] | passed | 0.01423 seconds |
87
+ ./spec/approve/pending_job_spec.rb[1:1:6] | passed | 0.02243 seconds |
88
+ ./spec/approve/pending_job_spec.rb[1:1:7] | passed | 0.03129 seconds |
89
+ ./spec/approve/pending_job_spec.rb[1:1:8] | passed | 0.02571 seconds |
90
+ ./spec/approve/pending_job_spec.rb[1:1:9] | passed | 0.02246 seconds |
91
+ ./spec/approve/pending_job_spec.rb[1:2:1] | passed | 0.02854 seconds |
92
+ ./spec/approve/pending_job_spec.rb[1:2:2] | passed | 0.01222 seconds |
93
+ ./spec/approve/pending_job_spec.rb[1:2:3] | passed | 0.00964 seconds |
94
+ ./spec/approve/pending_job_spec.rb[1:2:4] | passed | 0.01169 seconds |
95
+ ./spec/approve/pending_job_spec.rb[1:2:5] | passed | 0.00644 seconds |
96
+ ./spec/approve/pending_job_spec.rb[1:3:1:1] | passed | 0.01336 seconds |
97
+ ./spec/approve/pending_job_spec.rb[1:3:1:2] | passed | 0.01773 seconds |
98
+ ./spec/approve/pending_job_spec.rb[1:3:1:3] | passed | 0.01774 seconds |
99
+ ./spec/approve/pending_job_spec.rb[1:3:1:4] | passed | 0.01562 seconds |
100
+ ./spec/approve/pending_job_spec.rb[1:3:1:5] | passed | 0.02249 seconds |
101
+ ./spec/approve/pending_job_spec.rb[1:3:1:6] | passed | 0.01776 seconds |
102
+ ./spec/approve/pending_job_spec.rb[1:3:1:7] | passed | 0.01545 seconds |
103
+ ./spec/approve/pending_job_spec.rb[1:4:1:1] | passed | 0.01543 seconds |
104
+ ./spec/approve/pending_job_spec.rb[1:4:1:2] | passed | 0.02058 seconds |
105
+ ./spec/approve/pending_job_spec.rb[1:4:1:3] | passed | 0.02296 seconds |
106
+ ./spec/approve/pending_job_spec.rb[1:4:1:4] | passed | 0.01695 seconds |
107
+ ./spec/approve/pending_job_spec.rb[1:4:1:5] | passed | 0.02493 seconds |
108
+ ./spec/approve/pending_job_spec.rb[1:4:1:6] | passed | 0.01939 seconds |
109
+ ./spec/approve/pending_job_spec.rb[1:4:1:7] | passed | 0.01421 seconds |
110
+ ./spec/approve/pending_job_spec.rb[1:5:1] | passed | 0.01046 seconds |
111
+ ./spec/approve/pending_job_spec.rb[1:6:1] | passed | 0.05051 seconds |
112
+ ./spec/approve/pending_job_spec.rb[1:6:2] | passed | 0.01858 seconds |
113
+ ./spec/approve/pending_job_spec.rb[1:6:3:1] | passed | 0.01444 seconds |
114
+ ./spec/approve/pending_job_spec.rb[1:6:3:2] | passed | 0.02999 seconds |
115
+ ./spec/approve/pending_job_spec.rb[1:6:3:3] | passed | 0.03861 seconds |
116
+ ./spec/approve/pending_job_spec.rb[1:6:3:4] | passed | 0.03129 seconds |
117
+ ./spec/approve/pending_job_spec.rb[1:6:3:5] | passed | 0.02636 seconds |
118
+ ./spec/approve/pending_job_spec.rb[1:6:3:6] | passed | 0.04383 seconds |
119
+ ./spec/approve/pending_job_spec.rb[1:6:3:7] | passed | 0.02724 seconds |
120
+ ./spec/approve/pending_job_spec.rb[1:6:3:8] | passed | 0.04022 seconds |
121
+ ./spec/approve/pending_job_spec.rb[1:6:3:9] | passed | 0.0233 seconds |
122
+ ./spec/approve/pending_job_spec.rb[1:6:3:10] | passed | 0.02319 seconds |
123
+ ./spec/approve/pending_job_spec.rb[1:6:3:11] | passed | 0.01816 seconds |
124
+ ./spec/approve/pending_job_spec.rb[1:7:1] | passed | 0.01713 seconds |
125
+ ./spec/approve/pending_job_spec.rb[1:7:2] | passed | 0.02065 seconds |
126
+ ./spec/approve/pending_job_spec.rb[1:7:3] | passed | 0.0125 seconds |
127
+ ./spec/approve/pending_job_spec.rb[1:8:1] | passed | 0.01457 seconds |
128
+ ./spec/approve/pending_job_spec.rb[1:8:2] | passed | 0.00935 seconds |
129
+ ./spec/approve/pending_job_spec.rb[1:8:3] | passed | 0.01291 seconds |
130
+ ./spec/approve/pending_job_spec.rb[1:8:4] | passed | 0.01756 seconds |
131
+ ./spec/approve/pending_job_spec.rb[1:8:5] | passed | 0.02658 seconds |
132
+ ./spec/approve/pending_job_spec.rb[1:9:1] | passed | 0.00807 seconds |
133
+ ./spec/approve/pending_job_spec.rb[1:9:2:1] | passed | 0.01663 seconds |
134
+ ./spec/approve/pending_job_spec.rb[1:10:1:1] | passed | 0.01469 seconds |
135
+ ./spec/approve/pending_job_spec.rb[1:11:1] | passed | 0.01809 seconds |
136
+ ./spec/approve/pending_job_spec.rb[1:11:2:1] | passed | 0.01808 seconds |
137
+ ./spec/approve/pending_job_spec.rb[1:12:1] | passed | 0.01273 seconds |
138
+ ./spec/approve/pending_job_spec.rb[1:12:2] | passed | 0.01588 seconds |
139
+ ./spec/approve/pending_job_spec.rb[1:12:3:1] | passed | 0.01387 seconds |
140
+ ./spec/approve_spec.rb[1:1] | passed | 0.0083 seconds |
141
+ ./spec/approve_spec.rb[1:2] | passed | 0.00235 seconds |
142
+ ./spec/approve_spec.rb[1:3] | passed | 0.00769 seconds |
143
+ ./spec/approve_spec.rb[1:4] | passed | 0.01523 seconds |
144
+ ./spec/approve_spec.rb[1:5] | passed | 0.02752 seconds |
145
+ ./spec/approve_spec.rb[1:6] | passed | 0.03219 seconds |
146
+ ./spec/approve_spec.rb[1:7] | passed | 0.01781 seconds |
147
+ ./spec/approve_spec.rb[1:8:1] | passed | 0.03821 seconds |
148
+ ./spec/approve_spec.rb[1:8:2] | passed | 0.0473 seconds |
149
+ ./spec/approve_spec.rb[1:8:3] | passed | 0.0333 seconds |
150
+ ./spec/approve_spec.rb[1:8:4] | passed | 0.03665 seconds |
151
+ ./spec/approve_spec.rb[1:8:5] | passed | 0.04459 seconds |
152
+ ./spec/approve_spec.rb[1:8:6] | passed | 0.01771 seconds |
153
+ ./spec/approve_spec.rb[1:9:1] | passed | 0.03422 seconds |
154
+ ./spec/approve_spec.rb[1:9:2] | passed | 0.04599 seconds |
155
+ ./spec/approve_spec.rb[1:10:1] | passed | 0.07942 seconds |
156
+ ./spec/approve_spec.rb[1:10:2] | passed | 0.06398 seconds |
157
+ ./spec/approve_spec.rb[1:11:1] | passed | 0.00684 seconds |
158
+ ./spec/approve_spec.rb[1:11:2] | passed | 0.0105 seconds |
159
+ ./spec/approve_spec.rb[1:11:3] | passed | 0.00971 seconds |
160
+ ./spec/approve_spec.rb[1:11:4] | passed | 0.00764 seconds |
161
+ ./spec/approve_spec.rb[1:11:5] | passed | 0.00609 seconds |
162
+ ./spec/server/public/approve.css_spec.rb[1:1] | passed | 0.0054 seconds |
163
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:1] | passed | 0.04529 seconds |
164
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:2] | passed | 0.02892 seconds |
165
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:3] | passed | 0.0578 seconds |
166
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:4] | passed | 0.04502 seconds |
167
+ ./spec/server/views/approval_keys.erb_spec.rb[1:2] | passed | 0.07674 seconds |
168
+ ./spec/server/views/approval_keys.erb_spec.rb[1:3] | passed | 0.04513 seconds |
169
+ ./spec/server/views/job_details.erb_spec.rb[1:1] | passed | 0.08315 seconds |
170
+ ./spec/server/views/job_details.erb_spec.rb[1:2] | passed | 0.04624 seconds |
171
+ ./spec/server/views/job_details.erb_spec.rb[1:3] | passed | 1.73 seconds |
172
+ ./spec/server/views/job_details.erb_spec.rb[1:4] | passed | 0.02069 seconds |
173
+ ./spec/server/views/job_details.erb_spec.rb[1:5] | passed | 0.01396 seconds |
174
+ ./spec/server/views/job_details.erb_spec.rb[1:6] | passed | 0.02867 seconds |
175
+ ./spec/server/views/job_list.erb_spec.rb[1:1:1] | passed | 0.04222 seconds |
176
+ ./spec/server/views/job_list.erb_spec.rb[1:1:2] | passed | 0.03578 seconds |
177
+ ./spec/server/views/job_list.erb_spec.rb[1:1:3] | passed | 0.03982 seconds |
178
+ ./spec/server/views/job_list.erb_spec.rb[1:1:4] | passed | 0.0696 seconds |
179
+ ./spec/server/views/job_list.erb_spec.rb[1:1:5] | passed | 0.04623 seconds |
180
+ ./spec/server/views/job_list.erb_spec.rb[1:1:6] | passed | 0.04276 seconds |
181
+ ./spec/server/views/job_list.erb_spec.rb[1:1:7] | passed | 0.03182 seconds |
182
+ ./spec/server/views/job_list.erb_spec.rb[1:2] | passed | 0.07216 seconds |
183
+ ./spec/server/views/job_list.erb_spec.rb[1:3] | passed | 0.05124 seconds |
184
+ ./spec/server/views/job_list.erb_spec.rb[1:4] | passed | 0.05665 seconds |
@@ -41,6 +41,16 @@ RSpec.describe "approval_keys.erb" do
41
41
  expect(Resque).not_to have_received(:enqueue_to)
42
42
  end
43
43
 
44
+ it "should respond to /approve/reset_running" do
45
+ expect(queue).to receive(:reset_running).and_call_original
46
+
47
+ post "/approve/reset_running?#{{ approval_key: key }.to_param}"
48
+
49
+ expect(last_response).to be_redirect
50
+ expect(last_response.header["Location"]).to match(%r{approve/job_list\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}$})
51
+ expect(Resque).not_to have_received(:enqueue_to)
52
+ end
53
+
44
54
  it "should respond to /approve/delete_one_queue" do
45
55
  expect(queue).to receive(:remove_one).and_call_original
46
56
 
@@ -101,6 +111,7 @@ RSpec.describe "approval_keys.erb" do
101
111
 
102
112
  expect(last_response.body).to match %r{Approval Keys(\n *)?</a>}
103
113
 
114
+ expect(last_response.body).to match %r{action="/approve/reset_running\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
104
115
  expect(last_response.body).to match %r{action="/approve/delete_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
105
116
  expect(last_response.body).to match %r{action="/approve/delete_one_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
106
117
  expect(last_response.body).to match %r{action="/approve/approve_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
@@ -128,6 +139,7 @@ RSpec.describe "approval_keys.erb" do
128
139
 
129
140
  expect(last_response.body).to match %r{Approval Keys(\n *)?</a>}
130
141
 
142
+ expect(last_response.body).to match %r{action="/approve/reset_running\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
131
143
  expect(last_response.body).to match %r{action="/approve/delete_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
132
144
  expect(last_response.body).to match %r{action="/approve/delete_one_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
133
145
  expect(last_response.body).to match %r{action="/approve/approve_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "resque/plugins/compressible"
4
+
3
5
  class AutoDeleteApprovalKeyJob < BasicJob
4
6
  self.auto_delete_approval_key = true
7
+
8
+ extend Resque::Plugins::Compressible
5
9
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DefaultApprovalQueue < BasicJob
4
+ self.default_queue_name = "Default Approval Queue"
5
+ end