resque-approve 0.0.6 → 0.0.14

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.00156 seconds |
4
- ./spec/approve/approval_key_list_spec.rb[1:1:2] | passed | 0.00137 seconds |
5
- ./spec/approve/approval_key_list_spec.rb[1:1:3] | passed | 0.00124 seconds |
6
- ./spec/approve/approval_key_list_spec.rb[1:2:1] | passed | 0.009 seconds |
7
- ./spec/approve/approval_key_list_spec.rb[1:2:2] | passed | 0.00538 seconds |
8
- ./spec/approve/approval_key_list_spec.rb[1:3:1] | passed | 0.00532 seconds |
9
- ./spec/approve/approval_key_list_spec.rb[1:3:2] | passed | 0.00486 seconds |
10
- ./spec/approve/approval_key_list_spec.rb[1:4:1] | passed | 0.00867 seconds |
11
- ./spec/approve/approval_key_list_spec.rb[1:4:2] | passed | 0.00747 seconds |
12
- ./spec/approve/approval_key_list_spec.rb[1:4:3] | passed | 0.00741 seconds |
13
- ./spec/approve/approval_key_list_spec.rb[1:5:1] | passed | 0.02348 seconds |
14
- ./spec/approve/approval_key_list_spec.rb[1:5:2] | passed | 0.03227 seconds |
15
- ./spec/approve/approval_key_list_spec.rb[1:5:3] | passed | 0.02015 seconds |
16
- ./spec/approve/approval_key_list_spec.rb[1:6:1] | passed | 0.04331 seconds |
17
- ./spec/approve/approval_key_list_spec.rb[1:6:2] | passed | 0.03872 seconds |
18
- ./spec/approve/approval_key_list_spec.rb[1:6:3] | passed | 0.02854 seconds |
19
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:1] | passed | 0.38407 seconds |
20
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:2] | passed | 0.36597 seconds |
21
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:3] | passed | 0.41783 seconds |
22
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:4] | passed | 0.42648 seconds |
23
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:5] | passed | 0.36745 seconds |
24
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:6] | passed | 0.4482 seconds |
25
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:7] | passed | 0.38761 seconds |
26
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:1] | passed | 0.37038 seconds |
27
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:2] | passed | 0.39953 seconds |
28
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:3] | passed | 0.38793 seconds |
29
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:4] | passed | 0.36764 seconds |
30
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:5] | passed | 0.37099 seconds |
31
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:6] | passed | 0.37005 seconds |
32
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:7] | passed | 0.40552 seconds |
33
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:1] | passed | 0.42181 seconds |
34
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:2] | passed | 0.40046 seconds |
35
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:3] | passed | 0.38817 seconds |
36
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:4] | passed | 0.41089 seconds |
37
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:5] | passed | 0.37541 seconds |
38
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:6] | passed | 0.42198 seconds |
39
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:7] | passed | 0.38551 seconds |
40
- ./spec/approve/approval_key_list_spec.rb[1:8:1] | passed | 0.04225 seconds |
41
- ./spec/approve/approval_key_list_spec.rb[1:9:1] | passed | 0.04439 seconds |
42
- ./spec/approve/cleaner_spec.rb[1:1:1] | passed | 0.01633 seconds |
43
- ./spec/approve/cleaner_spec.rb[1:1:2] | passed | 0.01426 seconds |
44
- ./spec/approve/cleaner_spec.rb[1:1:3] | passed | 0.01526 seconds |
45
- ./spec/approve/cleaner_spec.rb[1:2:1] | passed | 0.02411 seconds |
46
- ./spec/approve/cleaner_spec.rb[1:2:2] | passed | 0.02596 seconds |
47
- ./spec/approve/cleaner_spec.rb[1:3:1] | passed | 0.02112 seconds |
48
- ./spec/approve/pending_job_queue_spec.rb[1:1:1] | passed | 0.0158 seconds |
49
- ./spec/approve/pending_job_queue_spec.rb[1:1:2] | passed | 0.01034 seconds |
50
- ./spec/approve/pending_job_queue_spec.rb[1:1:3] | passed | 0.01497 seconds |
51
- ./spec/approve/pending_job_queue_spec.rb[1:1:4] | passed | 0.0132 seconds |
52
- ./spec/approve/pending_job_queue_spec.rb[1:1:5:1] | passed | 0.01409 seconds |
53
- ./spec/approve/pending_job_queue_spec.rb[1:2:1] | passed | 0.01395 seconds |
54
- ./spec/approve/pending_job_queue_spec.rb[1:2:2] | passed | 0.0124 seconds |
55
- ./spec/approve/pending_job_queue_spec.rb[1:3:1] | passed | 0.00978 seconds |
56
- ./spec/approve/pending_job_queue_spec.rb[1:3:2] | passed | 0.00826 seconds |
57
- ./spec/approve/pending_job_queue_spec.rb[1:4:1] | passed | 0.0192 seconds |
58
- ./spec/approve/pending_job_queue_spec.rb[1:4:2] | passed | 0.01561 seconds |
59
- ./spec/approve/pending_job_queue_spec.rb[1:5:1] | passed | 0.01215 seconds |
60
- ./spec/approve/pending_job_queue_spec.rb[1:5:2] | passed | 0.01077 seconds |
61
- ./spec/approve/pending_job_queue_spec.rb[1:6:1] | passed | 0.01908 seconds |
62
- ./spec/approve/pending_job_queue_spec.rb[1:6:2] | passed | 0.0094 seconds |
63
- ./spec/approve/pending_job_queue_spec.rb[1:7:1] | passed | 0.01132 seconds |
64
- ./spec/approve/pending_job_queue_spec.rb[1:7:2] | passed | 0.01024 seconds |
65
- ./spec/approve/pending_job_queue_spec.rb[1:8:1] | passed | 0.01164 seconds |
66
- ./spec/approve/pending_job_queue_spec.rb[1:8:2] | passed | 0.01837 seconds |
67
- ./spec/approve/pending_job_queue_spec.rb[1:9:1] | passed | 0.01469 seconds |
68
- ./spec/approve/pending_job_queue_spec.rb[1:9:2] | passed | 0.01503 seconds |
69
- ./spec/approve/pending_job_queue_spec.rb[1:10:1] | passed | 0.01306 seconds |
70
- ./spec/approve/pending_job_queue_spec.rb[1:10:2] | passed | 0.01822 seconds |
71
- ./spec/approve/pending_job_queue_spec.rb[1:11:1] | passed | 0.03246 seconds |
72
- ./spec/approve/pending_job_queue_spec.rb[1:11:2] | passed | 0.03153 seconds |
73
- ./spec/approve/pending_job_queue_spec.rb[1:11:3] | passed | 0.02713 seconds |
74
- ./spec/approve/pending_job_queue_spec.rb[1:11:4] | passed | 0.02476 seconds |
75
- ./spec/approve/pending_job_queue_spec.rb[1:11:5] | passed | 0.02831 seconds |
76
- ./spec/approve/pending_job_queue_spec.rb[1:12:1] | passed | 0.00874 seconds |
77
- ./spec/approve/pending_job_queue_spec.rb[1:13:1] | passed | 0.01936 seconds |
78
- ./spec/approve/pending_job_queue_spec.rb[1:14:1] | passed | 0.00438 seconds |
79
- ./spec/approve/pending_job_queue_spec.rb[1:14:2] | passed | 0.01135 seconds |
80
- ./spec/approve/pending_job_queue_spec.rb[1:14:3] | passed | 1.29 seconds |
81
- ./spec/approve/pending_job_queue_spec.rb[1:14:4] | passed | 0.91509 seconds |
82
- ./spec/approve/pending_job_spec.rb[1:1:1] | passed | 0.00512 seconds |
83
- ./spec/approve/pending_job_spec.rb[1:1:2] | passed | 0.00385 seconds |
84
- ./spec/approve/pending_job_spec.rb[1:1:3] | passed | 0.00416 seconds |
85
- ./spec/approve/pending_job_spec.rb[1:1:4] | passed | 0.00457 seconds |
86
- ./spec/approve/pending_job_spec.rb[1:1:5] | passed | 0.00771 seconds |
87
- ./spec/approve/pending_job_spec.rb[1:1:6] | passed | 0.00483 seconds |
88
- ./spec/approve/pending_job_spec.rb[1:1:7] | passed | 0.00623 seconds |
89
- ./spec/approve/pending_job_spec.rb[1:2:1] | passed | 0.0066 seconds |
90
- ./spec/approve/pending_job_spec.rb[1:2:2] | passed | 0.00222 seconds |
91
- ./spec/approve/pending_job_spec.rb[1:2:3] | passed | 0.00103 seconds |
92
- ./spec/approve/pending_job_spec.rb[1:2:4] | passed | 0.00096 seconds |
93
- ./spec/approve/pending_job_spec.rb[1:2:5] | passed | 0.00116 seconds |
94
- ./spec/approve/pending_job_spec.rb[1:3:1:1] | passed | 0.00817 seconds |
95
- ./spec/approve/pending_job_spec.rb[1:3:1:2] | passed | 0.00907 seconds |
96
- ./spec/approve/pending_job_spec.rb[1:3:1:3] | passed | 0.009 seconds |
97
- ./spec/approve/pending_job_spec.rb[1:3:1:4] | passed | 0.00863 seconds |
98
- ./spec/approve/pending_job_spec.rb[1:3:1:5] | passed | 0.00759 seconds |
99
- ./spec/approve/pending_job_spec.rb[1:3:1:6] | passed | 0.00766 seconds |
100
- ./spec/approve/pending_job_spec.rb[1:3:1:7] | passed | 0.00431 seconds |
101
- ./spec/approve/pending_job_spec.rb[1:4:1:1] | passed | 0.00382 seconds |
102
- ./spec/approve/pending_job_spec.rb[1:4:1:2] | passed | 0.00578 seconds |
103
- ./spec/approve/pending_job_spec.rb[1:4:1:3] | passed | 0.00891 seconds |
104
- ./spec/approve/pending_job_spec.rb[1:4:1:4] | passed | 0.00855 seconds |
105
- ./spec/approve/pending_job_spec.rb[1:4:1:5] | passed | 0.01199 seconds |
106
- ./spec/approve/pending_job_spec.rb[1:4:1:6] | passed | 0.00914 seconds |
107
- ./spec/approve/pending_job_spec.rb[1:4:1:7] | passed | 0.00947 seconds |
108
- ./spec/approve/pending_job_spec.rb[1:5:1] | passed | 0.00608 seconds |
109
- ./spec/approve/pending_job_spec.rb[1:6:1] | passed | 0.5295 seconds |
110
- ./spec/approve/pending_job_spec.rb[1:7:1] | passed | 0.01 seconds |
111
- ./spec/approve/pending_job_spec.rb[1:7:2] | passed | 0.01112 seconds |
112
- ./spec/approve/pending_job_spec.rb[1:7:3] | passed | 0.01308 seconds |
113
- ./spec/approve/pending_job_spec.rb[1:8:1] | passed | 0.01168 seconds |
114
- ./spec/approve/pending_job_spec.rb[1:8:2] | passed | 0.00508 seconds |
115
- ./spec/approve/pending_job_spec.rb[1:8:3] | passed | 0.00651 seconds |
116
- ./spec/approve/pending_job_spec.rb[1:8:4] | passed | 0.00356 seconds |
117
- ./spec/approve/pending_job_spec.rb[1:8:5] | passed | 0.00788 seconds |
118
- ./spec/approve_spec.rb[1:1] | passed | 0.00256 seconds |
119
- ./spec/approve_spec.rb[1:2] | passed | 0.0077 seconds |
120
- ./spec/approve_spec.rb[1:3] | passed | 0.00613 seconds |
121
- ./spec/approve_spec.rb[1:4] | passed | 0.01586 seconds |
122
- ./spec/approve_spec.rb[1:5] | passed | 0.00655 seconds |
123
- ./spec/approve_spec.rb[1:6:1] | passed | 0.01812 seconds |
124
- ./spec/approve_spec.rb[1:6:2] | passed | 0.01625 seconds |
125
- ./spec/approve_spec.rb[1:6:3] | passed | 0.01958 seconds |
126
- ./spec/approve_spec.rb[1:6:4] | passed | 0.02267 seconds |
127
- ./spec/approve_spec.rb[1:6:5] | passed | 0.02132 seconds |
128
- ./spec/approve_spec.rb[1:6:6] | passed | 0.01503 seconds |
129
- ./spec/approve_spec.rb[1:7:1] | passed | 0.00331 seconds |
130
- ./spec/approve_spec.rb[1:7:2] | passed | 0.01026 seconds |
131
- ./spec/approve_spec.rb[1:8:1] | passed | 0.00358 seconds |
132
- ./spec/approve_spec.rb[1:8:2] | passed | 0.01909 seconds |
133
- ./spec/server/public/approve.css_spec.rb[1:1] | passed | 0.00306 seconds |
134
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:1] | passed | 0.01294 seconds |
135
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:2] | passed | 0.01354 seconds |
136
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:3] | passed | 0.01807 seconds |
137
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:4] | passed | 0.01253 seconds |
138
- ./spec/server/views/approval_keys.erb_spec.rb[1:2] | passed | 0.02929 seconds |
139
- ./spec/server/views/approval_keys.erb_spec.rb[1:3] | passed | 0.02099 seconds |
140
- ./spec/server/views/job_details.erb_spec.rb[1:1] | passed | 0.01741 seconds |
141
- ./spec/server/views/job_details.erb_spec.rb[1:2] | passed | 0.01278 seconds |
142
- ./spec/server/views/job_details.erb_spec.rb[1:3] | passed | 0.02099 seconds |
143
- ./spec/server/views/job_details.erb_spec.rb[1:4] | passed | 0.02435 seconds |
144
- ./spec/server/views/job_details.erb_spec.rb[1:5] | passed | 0.01985 seconds |
145
- ./spec/server/views/job_details.erb_spec.rb[1:6] | passed | 0.02091 seconds |
146
- ./spec/server/views/job_list.erb_spec.rb[1:1:1] | passed | 0.0268 seconds |
147
- ./spec/server/views/job_list.erb_spec.rb[1:1:2] | passed | 0.0136 seconds |
148
- ./spec/server/views/job_list.erb_spec.rb[1:1:3] | passed | 0.02655 seconds |
149
- ./spec/server/views/job_list.erb_spec.rb[1:1:4] | passed | 0.02412 seconds |
150
- ./spec/server/views/job_list.erb_spec.rb[1:1:5] | passed | 0.01678 seconds |
151
- ./spec/server/views/job_list.erb_spec.rb[1:1:6] | passed | 0.014 seconds |
152
- ./spec/server/views/job_list.erb_spec.rb[1:2] | passed | 0.07078 seconds |
153
- ./spec/server/views/job_list.erb_spec.rb[1:3] | passed | 0.02701 seconds |
154
- ./spec/server/views/job_list.erb_spec.rb[1:4] | passed | 0.02225 seconds |
3
+ ./spec/approve/approval_key_list_spec.rb[1:1:1] | passed | 0.00265 seconds |
4
+ ./spec/approve/approval_key_list_spec.rb[1:1:2] | passed | 0.00103 seconds |
5
+ ./spec/approve/approval_key_list_spec.rb[1:1:3] | passed | 0.0043 seconds |
6
+ ./spec/approve/approval_key_list_spec.rb[1:2:1] | passed | 0.0109 seconds |
7
+ ./spec/approve/approval_key_list_spec.rb[1:2:2] | passed | 0.0164 seconds |
8
+ ./spec/approve/approval_key_list_spec.rb[1:3:1] | passed | 0.01462 seconds |
9
+ ./spec/approve/approval_key_list_spec.rb[1:3:2] | passed | 0.00519 seconds |
10
+ ./spec/approve/approval_key_list_spec.rb[1:4:1] | passed | 0.00774 seconds |
11
+ ./spec/approve/approval_key_list_spec.rb[1:4:2] | passed | 0.01565 seconds |
12
+ ./spec/approve/approval_key_list_spec.rb[1:4:3] | passed | 0.01172 seconds |
13
+ ./spec/approve/approval_key_list_spec.rb[1:5:1] | passed | 0.03688 seconds |
14
+ ./spec/approve/approval_key_list_spec.rb[1:5:2] | passed | 0.02846 seconds |
15
+ ./spec/approve/approval_key_list_spec.rb[1:5:3] | passed | 0.03089 seconds |
16
+ ./spec/approve/approval_key_list_spec.rb[1:6:1] | passed | 0.07239 seconds |
17
+ ./spec/approve/approval_key_list_spec.rb[1:6:2] | passed | 0.03854 seconds |
18
+ ./spec/approve/approval_key_list_spec.rb[1:6:3] | passed | 0.03881 seconds |
19
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:1] | passed | 0.41254 seconds |
20
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:2] | passed | 0.41565 seconds |
21
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:3] | passed | 0.44232 seconds |
22
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:4] | passed | 0.41332 seconds |
23
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:5] | passed | 0.40687 seconds |
24
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:6] | passed | 0.41585 seconds |
25
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:7] | passed | 0.43011 seconds |
26
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:1] | passed | 0.41658 seconds |
27
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:2] | passed | 0.51902 seconds |
28
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:3] | passed | 0.54293 seconds |
29
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:4] | passed | 0.57476 seconds |
30
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:5] | passed | 0.43536 seconds |
31
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:6] | passed | 0.40968 seconds |
32
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:7] | passed | 0.47406 seconds |
33
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:1] | passed | 0.42158 seconds |
34
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:2] | passed | 0.41665 seconds |
35
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:3] | passed | 0.44734 seconds |
36
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:4] | passed | 0.44264 seconds |
37
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:5] | passed | 0.41414 seconds |
38
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:6] | passed | 0.41505 seconds |
39
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:7] | passed | 0.41586 seconds |
40
+ ./spec/approve/approval_key_list_spec.rb[1:8:1] | passed | 0.07871 seconds |
41
+ ./spec/approve/approval_key_list_spec.rb[1:9:1] | passed | 0.13069 seconds |
42
+ ./spec/approve/cleaner_spec.rb[1:1:1] | passed | 0.0698 seconds |
43
+ ./spec/approve/cleaner_spec.rb[1:1:2] | passed | 0.04232 seconds |
44
+ ./spec/approve/cleaner_spec.rb[1:1:3] | passed | 0.0581 seconds |
45
+ ./spec/approve/cleaner_spec.rb[1:2:1] | passed | 0.03286 seconds |
46
+ ./spec/approve/cleaner_spec.rb[1:2:2] | passed | 0.06626 seconds |
47
+ ./spec/approve/cleaner_spec.rb[1:3:1] | passed | 0.03915 seconds |
48
+ ./spec/approve/pending_job_queue_spec.rb[1:1:1] | passed | 0.02694 seconds |
49
+ ./spec/approve/pending_job_queue_spec.rb[1:1:2] | passed | 0.0311 seconds |
50
+ ./spec/approve/pending_job_queue_spec.rb[1:1:3] | passed | 0.02157 seconds |
51
+ ./spec/approve/pending_job_queue_spec.rb[1:1:4] | passed | 0.01931 seconds |
52
+ ./spec/approve/pending_job_queue_spec.rb[1:1:5:1] | passed | 0.02151 seconds |
53
+ ./spec/approve/pending_job_queue_spec.rb[1:2:1] | passed | 0.0228 seconds |
54
+ ./spec/approve/pending_job_queue_spec.rb[1:2:2] | passed | 0.03086 seconds |
55
+ ./spec/approve/pending_job_queue_spec.rb[1:3:1] | passed | 0.0221 seconds |
56
+ ./spec/approve/pending_job_queue_spec.rb[1:3:2] | passed | 0.01865 seconds |
57
+ ./spec/approve/pending_job_queue_spec.rb[1:4:1] | passed | 0.03951 seconds |
58
+ ./spec/approve/pending_job_queue_spec.rb[1:4:2] | passed | 0.02902 seconds |
59
+ ./spec/approve/pending_job_queue_spec.rb[1:5:1] | passed | 0.02068 seconds |
60
+ ./spec/approve/pending_job_queue_spec.rb[1:5:2] | passed | 0.01433 seconds |
61
+ ./spec/approve/pending_job_queue_spec.rb[1:6:1] | passed | 0.04278 seconds |
62
+ ./spec/approve/pending_job_queue_spec.rb[1:6:2] | passed | 0.02881 seconds |
63
+ ./spec/approve/pending_job_queue_spec.rb[1:7:1] | passed | 0.02853 seconds |
64
+ ./spec/approve/pending_job_queue_spec.rb[1:7:2] | passed | 0.02825 seconds |
65
+ ./spec/approve/pending_job_queue_spec.rb[1:8:1] | passed | 0.0255 seconds |
66
+ ./spec/approve/pending_job_queue_spec.rb[1:8:2] | passed | 0.02038 seconds |
67
+ ./spec/approve/pending_job_queue_spec.rb[1:9:1] | passed | 0.02746 seconds |
68
+ ./spec/approve/pending_job_queue_spec.rb[1:9:2] | passed | 0.0201 seconds |
69
+ ./spec/approve/pending_job_queue_spec.rb[1:10:1] | passed | 0.04172 seconds |
70
+ ./spec/approve/pending_job_queue_spec.rb[1:10:2] | passed | 0.03776 seconds |
71
+ ./spec/approve/pending_job_queue_spec.rb[1:11:1] | passed | 0.04003 seconds |
72
+ ./spec/approve/pending_job_queue_spec.rb[1:11:2] | passed | 0.06471 seconds |
73
+ ./spec/approve/pending_job_queue_spec.rb[1:11:3] | passed | 0.05816 seconds |
74
+ ./spec/approve/pending_job_queue_spec.rb[1:11:4] | passed | 0.04423 seconds |
75
+ ./spec/approve/pending_job_queue_spec.rb[1:11:5] | passed | 0.03975 seconds |
76
+ ./spec/approve/pending_job_queue_spec.rb[1:12:1] | passed | 0.0197 seconds |
77
+ ./spec/approve/pending_job_queue_spec.rb[1:13:1] | passed | 0.0332 seconds |
78
+ ./spec/approve/pending_job_queue_spec.rb[1:14:1] | passed | 0.01193 seconds |
79
+ ./spec/approve/pending_job_queue_spec.rb[1:14:2] | passed | 0.02181 seconds |
80
+ ./spec/approve/pending_job_queue_spec.rb[1:14:3] | passed | 0.0205 seconds |
81
+ ./spec/approve/pending_job_queue_spec.rb[1:14:4] | passed | 0.0226 seconds |
82
+ ./spec/approve/pending_job_spec.rb[1:1:1] | passed | 0.01492 seconds |
83
+ ./spec/approve/pending_job_spec.rb[1:1:2] | passed | 0.00948 seconds |
84
+ ./spec/approve/pending_job_spec.rb[1:1:3] | passed | 0.00995 seconds |
85
+ ./spec/approve/pending_job_spec.rb[1:1:4] | passed | 0.01081 seconds |
86
+ ./spec/approve/pending_job_spec.rb[1:1:5] | passed | 0.01371 seconds |
87
+ ./spec/approve/pending_job_spec.rb[1:1:6] | passed | 0.01406 seconds |
88
+ ./spec/approve/pending_job_spec.rb[1:1:7] | passed | 0.01372 seconds |
89
+ ./spec/approve/pending_job_spec.rb[1:1:8] | passed | 0.00815 seconds |
90
+ ./spec/approve/pending_job_spec.rb[1:1:9] | passed | 0.01125 seconds |
91
+ ./spec/approve/pending_job_spec.rb[1:2:1] | passed | 0.0209 seconds |
92
+ ./spec/approve/pending_job_spec.rb[1:2:2] | passed | 0.00831 seconds |
93
+ ./spec/approve/pending_job_spec.rb[1:2:3] | passed | 0.00806 seconds |
94
+ ./spec/approve/pending_job_spec.rb[1:2:4] | passed | 0.00508 seconds |
95
+ ./spec/approve/pending_job_spec.rb[1:2:5] | passed | 0.00393 seconds |
96
+ ./spec/approve/pending_job_spec.rb[1:3:1:1] | passed | 0.00588 seconds |
97
+ ./spec/approve/pending_job_spec.rb[1:3:1:2] | passed | 0.00961 seconds |
98
+ ./spec/approve/pending_job_spec.rb[1:3:1:3] | passed | 0.00434 seconds |
99
+ ./spec/approve/pending_job_spec.rb[1:3:1:4] | passed | 0.00547 seconds |
100
+ ./spec/approve/pending_job_spec.rb[1:3:1:5] | passed | 0.01383 seconds |
101
+ ./spec/approve/pending_job_spec.rb[1:3:1:6] | passed | 0.01374 seconds |
102
+ ./spec/approve/pending_job_spec.rb[1:3:1:7] | passed | 0.0133 seconds |
103
+ ./spec/approve/pending_job_spec.rb[1:4:1:1] | passed | 0.01831 seconds |
104
+ ./spec/approve/pending_job_spec.rb[1:4:1:2] | passed | 0.02255 seconds |
105
+ ./spec/approve/pending_job_spec.rb[1:4:1:3] | passed | 0.01853 seconds |
106
+ ./spec/approve/pending_job_spec.rb[1:4:1:4] | passed | 0.01307 seconds |
107
+ ./spec/approve/pending_job_spec.rb[1:4:1:5] | passed | 0.01426 seconds |
108
+ ./spec/approve/pending_job_spec.rb[1:4:1:6] | passed | 0.01239 seconds |
109
+ ./spec/approve/pending_job_spec.rb[1:4:1:7] | passed | 0.01258 seconds |
110
+ ./spec/approve/pending_job_spec.rb[1:5:1] | passed | 0.00526 seconds |
111
+ ./spec/approve/pending_job_spec.rb[1:6:1] | passed | 0.02077 seconds |
112
+ ./spec/approve/pending_job_spec.rb[1:6:2] | passed | 0.00592 seconds |
113
+ ./spec/approve/pending_job_spec.rb[1:6:3:1] | passed | 0.01541 seconds |
114
+ ./spec/approve/pending_job_spec.rb[1:6:3:2] | passed | 0.02378 seconds |
115
+ ./spec/approve/pending_job_spec.rb[1:6:3:3] | passed | 0.0197 seconds |
116
+ ./spec/approve/pending_job_spec.rb[1:6:3:4] | passed | 0.0246 seconds |
117
+ ./spec/approve/pending_job_spec.rb[1:6:3:5] | passed | 0.01883 seconds |
118
+ ./spec/approve/pending_job_spec.rb[1:6:3:6] | passed | 0.0128 seconds |
119
+ ./spec/approve/pending_job_spec.rb[1:6:3:7] | passed | 0.0501 seconds |
120
+ ./spec/approve/pending_job_spec.rb[1:6:3:8] | passed | 0.03345 seconds |
121
+ ./spec/approve/pending_job_spec.rb[1:6:3:9] | passed | 0.00847 seconds |
122
+ ./spec/approve/pending_job_spec.rb[1:6:3:10] | passed | 0.01598 seconds |
123
+ ./spec/approve/pending_job_spec.rb[1:6:3:11] | passed | 0.00931 seconds |
124
+ ./spec/approve/pending_job_spec.rb[1:7:1] | passed | 0.00969 seconds |
125
+ ./spec/approve/pending_job_spec.rb[1:7:2] | passed | 0.01743 seconds |
126
+ ./spec/approve/pending_job_spec.rb[1:7:3] | passed | 0.01695 seconds |
127
+ ./spec/approve/pending_job_spec.rb[1:8:1] | passed | 0.00911 seconds |
128
+ ./spec/approve/pending_job_spec.rb[1:8:2] | passed | 0.00586 seconds |
129
+ ./spec/approve/pending_job_spec.rb[1:8:3] | passed | 0.00816 seconds |
130
+ ./spec/approve/pending_job_spec.rb[1:8:4] | passed | 0.00618 seconds |
131
+ ./spec/approve/pending_job_spec.rb[1:8:5] | passed | 0.00782 seconds |
132
+ ./spec/approve/pending_job_spec.rb[1:9:1] | passed | 1.35 seconds |
133
+ ./spec/approve/pending_job_spec.rb[1:9:2:1] | passed | 0.00309 seconds |
134
+ ./spec/approve/pending_job_spec.rb[1:10:1:1] | passed | 0.01032 seconds |
135
+ ./spec/approve/pending_job_spec.rb[1:11:1] | passed | 0.00811 seconds |
136
+ ./spec/approve/pending_job_spec.rb[1:11:2:1] | passed | 0.01445 seconds |
137
+ ./spec/approve/pending_job_spec.rb[1:12:1] | passed | 0.03063 seconds |
138
+ ./spec/approve/pending_job_spec.rb[1:12:2] | passed | 0.0158 seconds |
139
+ ./spec/approve/pending_job_spec.rb[1:12:3:1] | passed | 0.01031 seconds |
140
+ ./spec/approve_spec.rb[1:1] | passed | 0.00367 seconds |
141
+ ./spec/approve_spec.rb[1:2] | passed | 0.00096 seconds |
142
+ ./spec/approve_spec.rb[1:3] | passed | 0.00077 seconds |
143
+ ./spec/approve_spec.rb[1:4] | passed | 0.01354 seconds |
144
+ ./spec/approve_spec.rb[1:5] | passed | 0.013 seconds |
145
+ ./spec/approve_spec.rb[1:6] | passed | 0.01944 seconds |
146
+ ./spec/approve_spec.rb[1:7] | passed | 0.01425 seconds |
147
+ ./spec/approve_spec.rb[1:8:1] | passed | 0.02701 seconds |
148
+ ./spec/approve_spec.rb[1:8:2] | passed | 0.03118 seconds |
149
+ ./spec/approve_spec.rb[1:8:3] | passed | 0.03898 seconds |
150
+ ./spec/approve_spec.rb[1:8:4] | passed | 0.02414 seconds |
151
+ ./spec/approve_spec.rb[1:8:5] | passed | 0.02278 seconds |
152
+ ./spec/approve_spec.rb[1:8:6] | passed | 0.02482 seconds |
153
+ ./spec/approve_spec.rb[1:9:1] | passed | 0.06305 seconds |
154
+ ./spec/approve_spec.rb[1:9:2] | passed | 0.0263 seconds |
155
+ ./spec/approve_spec.rb[1:10:1] | passed | 0.02013 seconds |
156
+ ./spec/approve_spec.rb[1:10:2] | passed | 0.04703 seconds |
157
+ ./spec/approve_spec.rb[1:11:1] | passed | 0.00735 seconds |
158
+ ./spec/approve_spec.rb[1:11:2] | passed | 0.00324 seconds |
159
+ ./spec/approve_spec.rb[1:11:3] | passed | 0.00325 seconds |
160
+ ./spec/approve_spec.rb[1:11:4] | passed | 0.00861 seconds |
161
+ ./spec/approve_spec.rb[1:11:5] | passed | 0.01101 seconds |
162
+ ./spec/server/public/approve.css_spec.rb[1:1] | passed | 0.0112 seconds |
163
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:1] | passed | 0.03814 seconds |
164
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:2] | passed | 0.02303 seconds |
165
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:3] | passed | 0.06107 seconds |
166
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:4] | passed | 0.02508 seconds |
167
+ ./spec/server/views/approval_keys.erb_spec.rb[1:2] | passed | 0.03479 seconds |
168
+ ./spec/server/views/approval_keys.erb_spec.rb[1:3] | passed | 0.08551 seconds |
169
+ ./spec/server/views/job_details.erb_spec.rb[1:1] | passed | 0.02013 seconds |
170
+ ./spec/server/views/job_details.erb_spec.rb[1:2] | passed | 0.01757 seconds |
171
+ ./spec/server/views/job_details.erb_spec.rb[1:3] | passed | 0.01699 seconds |
172
+ ./spec/server/views/job_details.erb_spec.rb[1:4] | passed | 0.02102 seconds |
173
+ ./spec/server/views/job_details.erb_spec.rb[1:5] | passed | 0.0319 seconds |
174
+ ./spec/server/views/job_details.erb_spec.rb[1:6] | passed | 0.03062 seconds |
175
+ ./spec/server/views/job_list.erb_spec.rb[1:1:1] | passed | 0.02609 seconds |
176
+ ./spec/server/views/job_list.erb_spec.rb[1:1:2] | passed | 0.0441 seconds |
177
+ ./spec/server/views/job_list.erb_spec.rb[1:1:3] | passed | 0.03481 seconds |
178
+ ./spec/server/views/job_list.erb_spec.rb[1:1:4] | passed | 0.04101 seconds |
179
+ ./spec/server/views/job_list.erb_spec.rb[1:1:5] | passed | 0.0328 seconds |
180
+ ./spec/server/views/job_list.erb_spec.rb[1:1:6] | passed | 0.02417 seconds |
181
+ ./spec/server/views/job_list.erb_spec.rb[1:1:7] | passed | 0.04868 seconds |
182
+ ./spec/server/views/job_list.erb_spec.rb[1:2] | passed | 0.06259 seconds |
183
+ ./spec/server/views/job_list.erb_spec.rb[1:3] | passed | 0.04405 seconds |
184
+ ./spec/server/views/job_list.erb_spec.rb[1:4] | passed | 0.05793 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