resque-approve 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39f7dbc43279ef19b1cfbd9976a6538ded68a211
4
- data.tar.gz: 2f2839ca4e8fc82bb16010a12c733d4ad39e3d36
3
+ metadata.gz: 78d88d61cb6698afca0e4207552748fb84af607d
4
+ data.tar.gz: 705b87df0b736aad20f19f0d65d964383cddd416
5
5
  SHA512:
6
- metadata.gz: a1f55e126e4ae920bdcd772f882dc9d3ba7bb1a837de15fc3dde7c2031a4b734c1601ec4076c864eaa119eb152840c6e7bcdac2a6b59e524218ac25a7748f577
7
- data.tar.gz: d4273eba1ca8d91cc351436b9992d5fae09f45745d86bef96acd2bd9f909324fceadc167b8d23ee756518d2baaa8788ac63f095389b9ebf45e51b186233b38cd
6
+ metadata.gz: e779161eb55eaacea84652fd561b68e8e4e934e0bb2758fedae8dd50e32de774e06929a56def0b7688024ad6d134e2caf5d23b6a815917ba232d5ae38c6f49d3
7
+ data.tar.gz: d24b15e99d9ede508ec1166f5fc2ca5a69a616ec97550092d8d1b86044eb7315c8b2df961af82f411ad3873741861209ef2ba876af9c6a5eb7bff18e4ead9a94
@@ -110,6 +110,8 @@ module Resque
110
110
  delete_one_queue(base)
111
111
  approve_queue(base)
112
112
  approve_one_queue(base)
113
+ pause_queue(base)
114
+ resume_queue(base)
113
115
  delete_job(base)
114
116
  approve_job(base)
115
117
  end
@@ -195,6 +197,26 @@ module Resque
195
197
  end
196
198
  end
197
199
 
200
+ def pause_queue(base)
201
+ base.class_eval do
202
+ post "/approve/pause" do
203
+ Resque::Plugins::Approve::PendingJobQueue.new(params[:approval_key]).pause
204
+
205
+ redirect u("approve/job_list?#{{ approval_key: params[:approval_key] }.to_param}")
206
+ end
207
+ end
208
+ end
209
+
210
+ def resume_queue(base)
211
+ base.class_eval do
212
+ post "/approve/resume" do
213
+ Resque::Plugins::Approve::PendingJobQueue.new(params[:approval_key]).resume
214
+
215
+ redirect u("approve/job_list?#{{ approval_key: params[:approval_key] }.to_param}")
216
+ end
217
+ end
218
+ end
219
+
198
220
  def delete_job(base)
199
221
  base.class_eval do
200
222
  post "/approve/delete_job" do
@@ -15,6 +15,24 @@ module Resque
15
15
  @approval_key = approval_key
16
16
  end
17
17
 
18
+ def pause
19
+ redis.set(pause_key, true)
20
+ redis.set(paused_count_key, 0)
21
+ end
22
+
23
+ def paused?
24
+ redis.get(pause_key)
25
+ end
26
+
27
+ def num_ignored
28
+ redis.get(paused_count_key).to_i
29
+ end
30
+
31
+ def resume
32
+ redis.del(paused_count_key)
33
+ redis.del(pause_key)
34
+ end
35
+
18
36
  def delete
19
37
  jobs.each(&:delete)
20
38
  end
@@ -42,16 +60,24 @@ module Resque
42
60
  end
43
61
 
44
62
  def approve_one
63
+ return false if paused_job_skip?
64
+
45
65
  id = redis.lpop(queue_key)
46
66
 
47
67
  enqueue_job(id)
48
68
  end
49
69
 
70
+ def approve_num(num_approve)
71
+ num_approve.times { approve_one }
72
+ end
73
+
50
74
  def approve_all
51
75
  true while approve_one
52
76
  end
53
77
 
54
78
  def pop_job
79
+ return false if paused_job_skip?
80
+
55
81
  id = redis.rpop(queue_key)
56
82
 
57
83
  enqueue_job(id)
@@ -103,6 +129,14 @@ module Resque
103
129
  ApprovalKeyList.new.remove_key(approval_key) if num_jobs.zero?
104
130
  end
105
131
 
132
+ def paused_job_skip?
133
+ return false unless paused?
134
+
135
+ redis.incr(paused_count_key)
136
+
137
+ true
138
+ end
139
+
106
140
  def enqueue_job(id)
107
141
  return false unless id.present?
108
142
 
@@ -122,6 +156,14 @@ module Resque
122
156
  def queue_key
123
157
  @queue_key ||= "approve.job_queue.#{approval_key}"
124
158
  end
159
+
160
+ def pause_key
161
+ @pause_key ||= "approve.job_queue.#{approval_key}.paused"
162
+ end
163
+
164
+ def paused_count_key
165
+ @pause_key ||= "approve.job_queue.#{approval_key}.paused.count"
166
+ end
125
167
  end
126
168
  end
127
169
  end
@@ -22,6 +22,10 @@ module Resque
22
22
  PendingJobQueue.new(approval_key).approve_one
23
23
  end
24
24
 
25
+ def approve_num(num_approve, approval_key)
26
+ PendingJobQueue.new(approval_key).approve_num(num_approve)
27
+ end
28
+
25
29
  def remove(approval_key)
26
30
  PendingJobQueue.new(approval_key).remove_all
27
31
  end
@@ -3,7 +3,7 @@
3
3
  module Resque
4
4
  module Plugins
5
5
  module Approve
6
- VERSION = "0.0.2"
6
+ VERSION = "0.0.3"
7
7
  end
8
8
  end
9
9
  end
@@ -12,6 +12,12 @@
12
12
  </a>
13
13
  </p>
14
14
 
15
+ <% if pending_queue.paused? %>
16
+ <p>
17
+ Paused. Skipped <%= pending_queue.num_ignored %> resume actions.
18
+ </p>
19
+ <% end %>
20
+
15
21
  <% if pending_queue.num_jobs > 0 %>
16
22
  <h1>Jobs</h1>
17
23
 
@@ -38,6 +44,18 @@
38
44
  <input type="submit" name="" value="Delete All"/>
39
45
  </form>
40
46
 
47
+ <% if pending_queue.paused? %>
48
+ <form method="POST" action="<%= u("approve/resume") %>?<%=
49
+ { approval_key: pending_queue.approval_key }.to_param %>">
50
+ <input type="submit" name="" value="Resume"/>
51
+ </form>
52
+ <% else %>
53
+ <form method="POST" action="<%= u("approve/pause") %>?<%=
54
+ { approval_key: pending_queue.approval_key }.to_param %>">
55
+ <input type="submit" name="" value="Pause"/>
56
+ </form>
57
+ <% end %>
58
+
41
59
  <form method="POST" action="<%= u("approve/delete_one_queue") %>?<%=
42
60
  { approval_key: pending_queue.approval_key }.to_param %>">
43
61
  <input type="submit" name="" value="Delete One"/>
@@ -23,6 +23,10 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
23
23
  allow(Resque).to receive(:enqueue_to).and_call_original
24
24
  end
25
25
 
26
+ after(:each) do
27
+ job_queue.resume
28
+ end
29
+
26
30
  describe "delete" do
27
31
  it "deletes all jobs" do
28
32
  job_queue.delete
@@ -38,6 +42,13 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
38
42
  expect(job_queue.num_jobs).to eq 0
39
43
  end
40
44
 
45
+ it "removes all jobs from the queue if paused" do
46
+ job_queue.pause
47
+ job_queue.delete
48
+
49
+ expect(job_queue.num_jobs).to eq 0
50
+ end
51
+
41
52
  it "does not remove the key from the key_list" do
42
53
  job_queue.delete
43
54
 
@@ -97,6 +108,19 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
97
108
  expect(job_queue.jobs).not_to be_include jobs[0]
98
109
  expect(job_queue.num_jobs).to eq 3
99
110
  end
111
+
112
+ it "does not enqueues the first job if paused" do
113
+ job_queue.pause
114
+ job_queue.approve_one
115
+
116
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 0
117
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 1
118
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 2
119
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 3
120
+
121
+ expect(job_queue.jobs).to be_include jobs[0]
122
+ expect(job_queue.num_jobs).to eq 4
123
+ end
100
124
  end
101
125
 
102
126
  describe "pop_job" do
@@ -111,6 +135,19 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
111
135
  expect(job_queue.jobs).not_to be_include jobs[3]
112
136
  expect(job_queue.num_jobs).to eq 3
113
137
  end
138
+
139
+ it "does not enqueues the last job if paused" do
140
+ job_queue.pause
141
+ job_queue.pop_job
142
+
143
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 3
144
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 0
145
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 1
146
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 2
147
+
148
+ expect(job_queue.jobs).to be_include jobs[3]
149
+ expect(job_queue.num_jobs).to eq 4
150
+ end
114
151
  end
115
152
 
116
153
  describe "approve_all" do
@@ -124,10 +161,37 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
124
161
 
125
162
  expect(job_queue.jobs).to be_blank
126
163
  end
164
+
165
+ it "does not enqueues all jobs if paused" do
166
+ expect(job_queue.num_jobs).to eq 4
167
+
168
+ job_queue.pause
169
+ job_queue.approve_all
170
+
171
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 0
172
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 1
173
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 2
174
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 3
175
+
176
+ expect(job_queue.num_jobs).to eq 4
177
+ end
127
178
  end
128
179
 
129
180
  describe "remove_one" do
130
- it "enqueues the first job" do
181
+ it "removes the first job" do
182
+ job_queue.remove_one
183
+
184
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 0
185
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 1
186
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 2
187
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 3
188
+
189
+ expect(job_queue.jobs).not_to be_include jobs[0]
190
+ expect(job_queue.num_jobs).to eq 3
191
+ end
192
+
193
+ it "removes the first job" do
194
+ job_queue.pause
131
195
  job_queue.remove_one
132
196
 
133
197
  expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 0
@@ -141,7 +205,20 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
141
205
  end
142
206
 
143
207
  describe "remove_job_pop" do
144
- it "enqueues the last job" do
208
+ it "removes the last job" do
209
+ job_queue.remove_job_pop
210
+
211
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 3
212
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 0
213
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 1
214
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 2
215
+
216
+ expect(job_queue.jobs).not_to be_include jobs[3]
217
+ expect(job_queue.num_jobs).to eq 3
218
+ end
219
+
220
+ it "removes the last job if paused" do
221
+ job_queue.pause
145
222
  job_queue.remove_job_pop
146
223
 
147
224
  expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 3
@@ -155,7 +232,19 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
155
232
  end
156
233
 
157
234
  describe "remove_all" do
158
- it "enqueues all jobs" do
235
+ it "removes all jobs" do
236
+ job_queue.remove_all
237
+
238
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 0
239
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 1
240
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 2
241
+ expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 3
242
+
243
+ expect(job_queue.jobs).to be_blank
244
+ end
245
+
246
+ it "removes all jobs" do
247
+ job_queue.pause
159
248
  job_queue.remove_all
160
249
 
161
250
  expect(Resque).not_to have_received(:enqueue_to).with "Some_Queue", BasicJob, 0
@@ -216,4 +305,28 @@ RSpec.describe Resque::Plugins::Approve::PendingJobQueue do
216
305
  expect(job_queue.first_enqueued).to be_nil
217
306
  end
218
307
  end
308
+
309
+ describe "pause/resume" do
310
+ it "is not paused by default" do
311
+ expect(job_queue).not_to be_paused
312
+ end
313
+
314
+ it "can be paused" do
315
+ expect(job_queue).not_to be_paused
316
+ job_queue.pause
317
+ expect(job_queue).to be_paused
318
+ job_queue.pause
319
+ expect(job_queue).to be_paused
320
+ end
321
+
322
+ it "can be resumed" do
323
+ expect(job_queue).not_to be_paused
324
+ job_queue.resume
325
+ expect(job_queue).not_to be_paused
326
+ job_queue.pause
327
+ expect(job_queue).to be_paused
328
+ job_queue.resume
329
+ expect(job_queue).not_to be_paused
330
+ end
331
+ end
219
332
  end
data/spec/approve_spec.rb CHANGED
@@ -120,6 +120,19 @@ RSpec.describe Resque::Plugins::Approve do
120
120
  expect(BasicJob).not_to have_received(:perform).with(*param_jobs[job_order.last])
121
121
  end
122
122
 
123
+ it "releases a count of jobs" do
124
+ jobs.each do |job_args|
125
+ Resque.enqueue BasicJob, *job_args
126
+ end
127
+
128
+ expect(BasicJob).not_to have_received(:perform)
129
+
130
+ Resque::Plugins::Approve.approve_num 3, approval_key
131
+
132
+ expect(BasicJob).to have_received(:perform).with(*param_jobs[job_order.first])
133
+ expect(BasicJob).to have_received(:perform).with(*param_jobs[job_order.last])
134
+ end
135
+
123
136
  it "releases all jobs" do
124
137
  jobs.each { |job_args| Resque.enqueue BasicJob, *job_args }
125
138
 
data/spec/examples.txt CHANGED
@@ -1,135 +1,149 @@
1
- example_id | status | run_time |
2
- ---------------------------------------------------- | ------ | --------------- |
3
- ./spec/approve/approval_key_list_spec.rb[1:1:1] | passed | 0.00081 seconds |
4
- ./spec/approve/approval_key_list_spec.rb[1:1:2] | passed | 0.00058 seconds |
5
- ./spec/approve/approval_key_list_spec.rb[1:1:3] | passed | 0.0008 seconds |
6
- ./spec/approve/approval_key_list_spec.rb[1:2:1] | passed | 0.00329 seconds |
7
- ./spec/approve/approval_key_list_spec.rb[1:2:2] | passed | 0.00419 seconds |
8
- ./spec/approve/approval_key_list_spec.rb[1:3:1] | passed | 0.00211 seconds |
9
- ./spec/approve/approval_key_list_spec.rb[1:3:2] | passed | 0.00264 seconds |
10
- ./spec/approve/approval_key_list_spec.rb[1:4:1] | passed | 0.00337 seconds |
11
- ./spec/approve/approval_key_list_spec.rb[1:4:2] | passed | 0.00542 seconds |
12
- ./spec/approve/approval_key_list_spec.rb[1:4:3] | passed | 0.00462 seconds |
13
- ./spec/approve/approval_key_list_spec.rb[1:5:1] | passed | 0.01753 seconds |
14
- ./spec/approve/approval_key_list_spec.rb[1:5:2] | passed | 0.01523 seconds |
15
- ./spec/approve/approval_key_list_spec.rb[1:5:3] | passed | 0.01682 seconds |
16
- ./spec/approve/approval_key_list_spec.rb[1:6:1] | passed | 0.03665 seconds |
17
- ./spec/approve/approval_key_list_spec.rb[1:6:2] | passed | 0.02217 seconds |
18
- ./spec/approve/approval_key_list_spec.rb[1:6:3] | passed | 0.02712 seconds |
19
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:1] | passed | 0.37457 seconds |
20
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:2] | passed | 0.37665 seconds |
21
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:3] | passed | 0.37041 seconds |
22
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:4] | passed | 0.37069 seconds |
23
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:5] | passed | 0.37388 seconds |
24
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:6] | passed | 0.37706 seconds |
25
- ./spec/approve/approval_key_list_spec.rb[1:7:1:1:7] | passed | 0.3846 seconds |
26
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:1] | passed | 0.38664 seconds |
27
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:2] | passed | 0.38505 seconds |
28
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:3] | passed | 0.46689 seconds |
29
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:4] | passed | 0.38358 seconds |
30
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:5] | passed | 0.37826 seconds |
31
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:6] | passed | 0.39196 seconds |
32
- ./spec/approve/approval_key_list_spec.rb[1:7:2:1:7] | passed | 0.39493 seconds |
33
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:1] | passed | 0.38132 seconds |
34
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:2] | passed | 0.37191 seconds |
35
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:3] | passed | 0.39882 seconds |
36
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:4] | passed | 0.38268 seconds |
37
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:5] | passed | 0.39867 seconds |
38
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:6] | passed | 0.3975 seconds |
39
- ./spec/approve/approval_key_list_spec.rb[1:7:3:1:7] | passed | 0.388 seconds |
40
- ./spec/approve/approval_key_list_spec.rb[1:8:1] | passed | 0.02978 seconds |
41
- ./spec/approve/approval_key_list_spec.rb[1:9:1] | passed | 0.03033 seconds |
42
- ./spec/approve/cleaner_spec.rb[1:1:1] | passed | 0.01382 seconds |
43
- ./spec/approve/cleaner_spec.rb[1:1:2] | passed | 0.00929 seconds |
44
- ./spec/approve/cleaner_spec.rb[1:1:3] | passed | 0.00982 seconds |
45
- ./spec/approve/cleaner_spec.rb[1:2:1] | passed | 0.01796 seconds |
46
- ./spec/approve/cleaner_spec.rb[1:2:2] | passed | 0.01627 seconds |
47
- ./spec/approve/cleaner_spec.rb[1:3:1] | passed | 0.00923 seconds |
48
- ./spec/approve/pending_job_queue_spec.rb[1:1:1] | passed | 0.0103 seconds |
49
- ./spec/approve/pending_job_queue_spec.rb[1:1:2] | passed | 0.00568 seconds |
50
- ./spec/approve/pending_job_queue_spec.rb[1:1:3] | passed | 0.0058 seconds |
51
- ./spec/approve/pending_job_queue_spec.rb[1:1:4:1] | passed | 0.00703 seconds |
52
- ./spec/approve/pending_job_queue_spec.rb[1:2:1] | passed | 0.00728 seconds |
53
- ./spec/approve/pending_job_queue_spec.rb[1:2:2] | passed | 0.00874 seconds |
54
- ./spec/approve/pending_job_queue_spec.rb[1:3:1] | passed | 0.00613 seconds |
55
- ./spec/approve/pending_job_queue_spec.rb[1:4:1] | passed | 0.00631 seconds |
56
- ./spec/approve/pending_job_queue_spec.rb[1:5:1] | passed | 0.00957 seconds |
57
- ./spec/approve/pending_job_queue_spec.rb[1:6:1] | passed | 0.00609 seconds |
58
- ./spec/approve/pending_job_queue_spec.rb[1:7:1] | passed | 0.00513 seconds |
59
- ./spec/approve/pending_job_queue_spec.rb[1:8:1] | passed | 0.0067 seconds |
60
- ./spec/approve/pending_job_queue_spec.rb[1:9:1] | passed | 0.02879 seconds |
61
- ./spec/approve/pending_job_queue_spec.rb[1:9:2] | passed | 0.02329 seconds |
62
- ./spec/approve/pending_job_queue_spec.rb[1:9:3] | passed | 0.02614 seconds |
63
- ./spec/approve/pending_job_queue_spec.rb[1:9:4] | passed | 0.02521 seconds |
64
- ./spec/approve/pending_job_queue_spec.rb[1:9:5] | passed | 0.02809 seconds |
65
- ./spec/approve/pending_job_queue_spec.rb[1:10:1] | passed | 0.00588 seconds |
66
- ./spec/approve/pending_job_queue_spec.rb[1:11:1] | passed | 0.01198 seconds |
67
- ./spec/approve/pending_job_spec.rb[1:1:1] | passed | 0.00472 seconds |
68
- ./spec/approve/pending_job_spec.rb[1:1:2] | passed | 0.00377 seconds |
69
- ./spec/approve/pending_job_spec.rb[1:1:3] | passed | 0.00224 seconds |
70
- ./spec/approve/pending_job_spec.rb[1:1:4] | passed | 0.00234 seconds |
71
- ./spec/approve/pending_job_spec.rb[1:1:5] | passed | 0.00158 seconds |
72
- ./spec/approve/pending_job_spec.rb[1:1:6] | passed | 0.00216 seconds |
73
- ./spec/approve/pending_job_spec.rb[1:1:7] | passed | 0.00177 seconds |
74
- ./spec/approve/pending_job_spec.rb[1:2:1] | passed | 0.00244 seconds |
75
- ./spec/approve/pending_job_spec.rb[1:2:2] | passed | 0.00095 seconds |
76
- ./spec/approve/pending_job_spec.rb[1:2:3] | passed | 0.00143 seconds |
77
- ./spec/approve/pending_job_spec.rb[1:2:4] | passed | 0.00126 seconds |
78
- ./spec/approve/pending_job_spec.rb[1:2:5] | passed | 0.00091 seconds |
79
- ./spec/approve/pending_job_spec.rb[1:3:1:1] | passed | 0.00249 seconds |
80
- ./spec/approve/pending_job_spec.rb[1:3:1:2] | passed | 0.0024 seconds |
81
- ./spec/approve/pending_job_spec.rb[1:3:1:3] | passed | 0.00217 seconds |
82
- ./spec/approve/pending_job_spec.rb[1:3:1:4] | passed | 0.0036 seconds |
83
- ./spec/approve/pending_job_spec.rb[1:3:1:5] | passed | 0.00262 seconds |
84
- ./spec/approve/pending_job_spec.rb[1:3:1:6] | passed | 0.00337 seconds |
85
- ./spec/approve/pending_job_spec.rb[1:3:1:7] | passed | 0.00259 seconds |
86
- ./spec/approve/pending_job_spec.rb[1:4:1:1] | passed | 0.0036 seconds |
87
- ./spec/approve/pending_job_spec.rb[1:4:1:2] | passed | 0.00381 seconds |
88
- ./spec/approve/pending_job_spec.rb[1:4:1:3] | passed | 0.00323 seconds |
89
- ./spec/approve/pending_job_spec.rb[1:4:1:4] | passed | 0.0035 seconds |
90
- ./spec/approve/pending_job_spec.rb[1:4:1:5] | passed | 0.00351 seconds |
91
- ./spec/approve/pending_job_spec.rb[1:4:1:6] | passed | 0.0049 seconds |
92
- ./spec/approve/pending_job_spec.rb[1:4:1:7] | passed | 0.00623 seconds |
93
- ./spec/approve/pending_job_spec.rb[1:5:1] | passed | 0.00209 seconds |
94
- ./spec/approve/pending_job_spec.rb[1:6:1] | passed | 0.00734 seconds |
95
- ./spec/approve/pending_job_spec.rb[1:7:1] | passed | 0.00295 seconds |
96
- ./spec/approve/pending_job_spec.rb[1:7:2] | passed | 0.00424 seconds |
97
- ./spec/approve/pending_job_spec.rb[1:7:3] | passed | 0.00436 seconds |
98
- ./spec/approve/pending_job_spec.rb[1:8:1] | passed | 0.00213 seconds |
99
- ./spec/approve/pending_job_spec.rb[1:8:2] | passed | 0.00182 seconds |
100
- ./spec/approve/pending_job_spec.rb[1:8:3] | passed | 0.00239 seconds |
101
- ./spec/approve/pending_job_spec.rb[1:8:4] | passed | 0.00229 seconds |
102
- ./spec/approve/pending_job_spec.rb[1:8:5] | passed | 0.00237 seconds |
103
- ./spec/approve_spec.rb[1:1] | passed | 0.00338 seconds |
104
- ./spec/approve_spec.rb[1:2] | passed | 0.00436 seconds |
105
- ./spec/approve_spec.rb[1:3] | passed | 0.55259 seconds |
106
- ./spec/approve_spec.rb[1:4] | passed | 0.00777 seconds |
107
- ./spec/approve_spec.rb[1:5] | passed | 0.00467 seconds |
108
- ./spec/approve_spec.rb[1:6:1] | passed | 0.00955 seconds |
109
- ./spec/approve_spec.rb[1:6:2] | passed | 0.01144 seconds |
110
- ./spec/approve_spec.rb[1:6:3] | passed | 0.01323 seconds |
111
- ./spec/approve_spec.rb[1:6:4] | passed | 0.01855 seconds |
112
- ./spec/approve_spec.rb[1:6:5] | passed | 0.01114 seconds |
113
- ./spec/approve_spec.rb[1:7:1] | passed | 0.0052 seconds |
114
- ./spec/approve_spec.rb[1:7:2] | passed | 0.01155 seconds |
115
- ./spec/approve_spec.rb[1:8:1] | passed | 0.00829 seconds |
116
- ./spec/approve_spec.rb[1:8:2] | passed | 0.01191 seconds |
117
- ./spec/server/public/approve.css_spec.rb[1:1] | passed | 0.00454 seconds |
118
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:1] | passed | 0.01122 seconds |
119
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:2] | passed | 0.01072 seconds |
120
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:3] | passed | 0.01359 seconds |
121
- ./spec/server/views/approval_keys.erb_spec.rb[1:1:4] | passed | 0.01491 seconds |
122
- ./spec/server/views/approval_keys.erb_spec.rb[1:2] | passed | 0.02502 seconds |
123
- ./spec/server/views/approval_keys.erb_spec.rb[1:3] | passed | 0.02061 seconds |
124
- ./spec/server/views/job_details.erb_spec.rb[1:1] | passed | 0.00957 seconds |
125
- ./spec/server/views/job_details.erb_spec.rb[1:2] | passed | 0.0069 seconds |
126
- ./spec/server/views/job_details.erb_spec.rb[1:3] | passed | 0.00974 seconds |
127
- ./spec/server/views/job_details.erb_spec.rb[1:4] | passed | 0.01302 seconds |
128
- ./spec/server/views/job_details.erb_spec.rb[1:5] | passed | 0.00842 seconds |
129
- ./spec/server/views/job_details.erb_spec.rb[1:6] | passed | 0.00889 seconds |
130
- ./spec/server/views/job_list.erb_spec.rb[1:1:1] | passed | 0.01121 seconds |
131
- ./spec/server/views/job_list.erb_spec.rb[1:1:2] | passed | 0.01482 seconds |
132
- ./spec/server/views/job_list.erb_spec.rb[1:1:3] | passed | 0.01566 seconds |
133
- ./spec/server/views/job_list.erb_spec.rb[1:1:4] | passed | 0.00769 seconds |
134
- ./spec/server/views/job_list.erb_spec.rb[1:2] | passed | 0.06212 seconds |
135
- ./spec/server/views/job_list.erb_spec.rb[1:3] | passed | 0.01679 seconds |
1
+ example_id | status | run_time |
2
+ ---------------------------------------------------- | ------- | --------------- |
3
+ ./spec/approve/approval_key_list_spec.rb[1:1:1] | passed | 0.00081 seconds |
4
+ ./spec/approve/approval_key_list_spec.rb[1:1:2] | passed | 0.00058 seconds |
5
+ ./spec/approve/approval_key_list_spec.rb[1:1:3] | passed | 0.0008 seconds |
6
+ ./spec/approve/approval_key_list_spec.rb[1:2:1] | passed | 0.00329 seconds |
7
+ ./spec/approve/approval_key_list_spec.rb[1:2:2] | passed | 0.00419 seconds |
8
+ ./spec/approve/approval_key_list_spec.rb[1:3:1] | passed | 0.00211 seconds |
9
+ ./spec/approve/approval_key_list_spec.rb[1:3:2] | passed | 0.00264 seconds |
10
+ ./spec/approve/approval_key_list_spec.rb[1:4:1] | passed | 0.00337 seconds |
11
+ ./spec/approve/approval_key_list_spec.rb[1:4:2] | passed | 0.00542 seconds |
12
+ ./spec/approve/approval_key_list_spec.rb[1:4:3] | passed | 0.00462 seconds |
13
+ ./spec/approve/approval_key_list_spec.rb[1:5:1] | passed | 0.01753 seconds |
14
+ ./spec/approve/approval_key_list_spec.rb[1:5:2] | passed | 0.01523 seconds |
15
+ ./spec/approve/approval_key_list_spec.rb[1:5:3] | passed | 0.01682 seconds |
16
+ ./spec/approve/approval_key_list_spec.rb[1:6:1] | passed | 0.03665 seconds |
17
+ ./spec/approve/approval_key_list_spec.rb[1:6:2] | passed | 0.02217 seconds |
18
+ ./spec/approve/approval_key_list_spec.rb[1:6:3] | passed | 0.02712 seconds |
19
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:1] | passed | 0.37457 seconds |
20
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:2] | passed | 0.37665 seconds |
21
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:3] | passed | 0.37041 seconds |
22
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:4] | passed | 0.37069 seconds |
23
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:5] | passed | 0.37388 seconds |
24
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:6] | passed | 0.37706 seconds |
25
+ ./spec/approve/approval_key_list_spec.rb[1:7:1:1:7] | passed | 0.3846 seconds |
26
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:1] | passed | 0.38664 seconds |
27
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:2] | passed | 0.38505 seconds |
28
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:3] | passed | 0.46689 seconds |
29
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:4] | passed | 0.38358 seconds |
30
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:5] | passed | 0.37826 seconds |
31
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:6] | passed | 0.39196 seconds |
32
+ ./spec/approve/approval_key_list_spec.rb[1:7:2:1:7] | passed | 0.39493 seconds |
33
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:1] | passed | 0.38132 seconds |
34
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:2] | passed | 0.37191 seconds |
35
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:3] | passed | 0.39882 seconds |
36
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:4] | passed | 0.38268 seconds |
37
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:5] | passed | 0.39867 seconds |
38
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:6] | passed | 0.3975 seconds |
39
+ ./spec/approve/approval_key_list_spec.rb[1:7:3:1:7] | passed | 0.388 seconds |
40
+ ./spec/approve/approval_key_list_spec.rb[1:8:1] | passed | 0.02978 seconds |
41
+ ./spec/approve/approval_key_list_spec.rb[1:9:1] | passed | 0.03033 seconds |
42
+ ./spec/approve/cleaner_spec.rb[1:1:1] | passed | 0.01382 seconds |
43
+ ./spec/approve/cleaner_spec.rb[1:1:2] | passed | 0.00929 seconds |
44
+ ./spec/approve/cleaner_spec.rb[1:1:3] | passed | 0.00982 seconds |
45
+ ./spec/approve/cleaner_spec.rb[1:2:1] | passed | 0.01796 seconds |
46
+ ./spec/approve/cleaner_spec.rb[1:2:2] | passed | 0.01627 seconds |
47
+ ./spec/approve/cleaner_spec.rb[1:3:1] | passed | 0.00923 seconds |
48
+ ./spec/approve/pending_job_queue_spec.rb[1:1:1] | passed | 0.01558 seconds |
49
+ ./spec/approve/pending_job_queue_spec.rb[1:1:2] | passed | 0.00899 seconds |
50
+ ./spec/approve/pending_job_queue_spec.rb[1:1:3] | passed | 0.01351 seconds |
51
+ ./spec/approve/pending_job_queue_spec.rb[1:1:4] | passed | 0.01493 seconds |
52
+ ./spec/approve/pending_job_queue_spec.rb[1:1:5:1] | passed | 0.01731 seconds |
53
+ ./spec/approve/pending_job_queue_spec.rb[1:2:1] | passed | 0.01576 seconds |
54
+ ./spec/approve/pending_job_queue_spec.rb[1:2:2] | passed | 0.02713 seconds |
55
+ ./spec/approve/pending_job_queue_spec.rb[1:3:1] | passed | 0.01337 seconds |
56
+ ./spec/approve/pending_job_queue_spec.rb[1:3:2] | passed | 0.01639 seconds |
57
+ ./spec/approve/pending_job_queue_spec.rb[1:4:1] | passed | 0.01908 seconds |
58
+ ./spec/approve/pending_job_queue_spec.rb[1:4:2] | passed | 0.01246 seconds |
59
+ ./spec/approve/pending_job_queue_spec.rb[1:5:1] | passed | 0.01823 seconds |
60
+ ./spec/approve/pending_job_queue_spec.rb[1:5:2] | passed | 0.01382 seconds |
61
+ ./spec/approve/pending_job_queue_spec.rb[1:6:1] | passed | 0.00568 seconds |
62
+ ./spec/approve/pending_job_queue_spec.rb[1:6:2] | passed | 0.01792 seconds |
63
+ ./spec/approve/pending_job_queue_spec.rb[1:7:1] | passed | 0.0115 seconds |
64
+ ./spec/approve/pending_job_queue_spec.rb[1:7:2] | passed | 0.01447 seconds |
65
+ ./spec/approve/pending_job_queue_spec.rb[1:8:1] | passed | 0.01243 seconds |
66
+ ./spec/approve/pending_job_queue_spec.rb[1:8:2] | passed | 0.01171 seconds |
67
+ ./spec/approve/pending_job_queue_spec.rb[1:9:1] | passed | 0.05488 seconds |
68
+ ./spec/approve/pending_job_queue_spec.rb[1:9:2] | passed | 0.03156 seconds |
69
+ ./spec/approve/pending_job_queue_spec.rb[1:9:3] | passed | 0.03417 seconds |
70
+ ./spec/approve/pending_job_queue_spec.rb[1:9:4] | passed | 0.03747 seconds |
71
+ ./spec/approve/pending_job_queue_spec.rb[1:9:5] | passed | 0.03307 seconds |
72
+ ./spec/approve/pending_job_queue_spec.rb[1:10:1] | passed | 0.5602 seconds |
73
+ ./spec/approve/pending_job_queue_spec.rb[1:11:1] | passed | 0.02438 seconds |
74
+ ./spec/approve/pending_job_queue_spec.rb[1:12:1] | passed | 0.01052 seconds |
75
+ ./spec/approve/pending_job_queue_spec.rb[1:12:2] | passed | 0.00988 seconds |
76
+ ./spec/approve/pending_job_queue_spec.rb[1:12:3] | passed | 0.00947 seconds |
77
+ ./spec/approve/pending_job_spec.rb[1:1:1] | passed | 0.00472 seconds |
78
+ ./spec/approve/pending_job_spec.rb[1:1:2] | passed | 0.00377 seconds |
79
+ ./spec/approve/pending_job_spec.rb[1:1:3] | passed | 0.00224 seconds |
80
+ ./spec/approve/pending_job_spec.rb[1:1:4] | passed | 0.00234 seconds |
81
+ ./spec/approve/pending_job_spec.rb[1:1:5] | passed | 0.00158 seconds |
82
+ ./spec/approve/pending_job_spec.rb[1:1:6] | passed | 0.00216 seconds |
83
+ ./spec/approve/pending_job_spec.rb[1:1:7] | passed | 0.00177 seconds |
84
+ ./spec/approve/pending_job_spec.rb[1:2:1] | passed | 0.00244 seconds |
85
+ ./spec/approve/pending_job_spec.rb[1:2:2] | passed | 0.00095 seconds |
86
+ ./spec/approve/pending_job_spec.rb[1:2:3] | passed | 0.00143 seconds |
87
+ ./spec/approve/pending_job_spec.rb[1:2:4] | passed | 0.00126 seconds |
88
+ ./spec/approve/pending_job_spec.rb[1:2:5] | passed | 0.00091 seconds |
89
+ ./spec/approve/pending_job_spec.rb[1:3:1:1] | passed | 0.00249 seconds |
90
+ ./spec/approve/pending_job_spec.rb[1:3:1:2] | passed | 0.0024 seconds |
91
+ ./spec/approve/pending_job_spec.rb[1:3:1:3] | passed | 0.00217 seconds |
92
+ ./spec/approve/pending_job_spec.rb[1:3:1:4] | passed | 0.0036 seconds |
93
+ ./spec/approve/pending_job_spec.rb[1:3:1:5] | passed | 0.00262 seconds |
94
+ ./spec/approve/pending_job_spec.rb[1:3:1:6] | passed | 0.00337 seconds |
95
+ ./spec/approve/pending_job_spec.rb[1:3:1:7] | passed | 0.00259 seconds |
96
+ ./spec/approve/pending_job_spec.rb[1:4:1:1] | passed | 0.0036 seconds |
97
+ ./spec/approve/pending_job_spec.rb[1:4:1:2] | passed | 0.00381 seconds |
98
+ ./spec/approve/pending_job_spec.rb[1:4:1:3] | passed | 0.00323 seconds |
99
+ ./spec/approve/pending_job_spec.rb[1:4:1:4] | passed | 0.0035 seconds |
100
+ ./spec/approve/pending_job_spec.rb[1:4:1:5] | passed | 0.00351 seconds |
101
+ ./spec/approve/pending_job_spec.rb[1:4:1:6] | passed | 0.0049 seconds |
102
+ ./spec/approve/pending_job_spec.rb[1:4:1:7] | passed | 0.00623 seconds |
103
+ ./spec/approve/pending_job_spec.rb[1:5:1] | passed | 0.00209 seconds |
104
+ ./spec/approve/pending_job_spec.rb[1:6:1] | passed | 0.00734 seconds |
105
+ ./spec/approve/pending_job_spec.rb[1:7:1] | passed | 0.00295 seconds |
106
+ ./spec/approve/pending_job_spec.rb[1:7:2] | passed | 0.00424 seconds |
107
+ ./spec/approve/pending_job_spec.rb[1:7:3] | passed | 0.00436 seconds |
108
+ ./spec/approve/pending_job_spec.rb[1:8:1] | passed | 0.00213 seconds |
109
+ ./spec/approve/pending_job_spec.rb[1:8:2] | passed | 0.00182 seconds |
110
+ ./spec/approve/pending_job_spec.rb[1:8:3] | passed | 0.00239 seconds |
111
+ ./spec/approve/pending_job_spec.rb[1:8:4] | passed | 0.00229 seconds |
112
+ ./spec/approve/pending_job_spec.rb[1:8:5] | passed | 0.00237 seconds |
113
+ ./spec/approve_spec.rb[1:1] | passed | 0.00338 seconds |
114
+ ./spec/approve_spec.rb[1:2] | passed | 0.00436 seconds |
115
+ ./spec/approve_spec.rb[1:3] | passed | 0.55259 seconds |
116
+ ./spec/approve_spec.rb[1:4] | passed | 0.00777 seconds |
117
+ ./spec/approve_spec.rb[1:5] | passed | 0.00467 seconds |
118
+ ./spec/approve_spec.rb[1:6:1] | passed | 0.00955 seconds |
119
+ ./spec/approve_spec.rb[1:6:2] | passed | 0.01144 seconds |
120
+ ./spec/approve_spec.rb[1:6:3] | passed | 0.51245 seconds |
121
+ ./spec/approve_spec.rb[1:6:4] | passed | 0.01855 seconds |
122
+ ./spec/approve_spec.rb[1:6:5] | passed | 0.01114 seconds |
123
+ ./spec/approve_spec.rb[1:6:6] | unknown | |
124
+ ./spec/approve_spec.rb[1:7:1] | passed | 0.0052 seconds |
125
+ ./spec/approve_spec.rb[1:7:2] | passed | 0.01155 seconds |
126
+ ./spec/approve_spec.rb[1:8:1] | passed | 0.00829 seconds |
127
+ ./spec/approve_spec.rb[1:8:2] | passed | 0.01191 seconds |
128
+ ./spec/server/public/approve.css_spec.rb[1:1] | passed | 0.00454 seconds |
129
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:1] | passed | 0.01122 seconds |
130
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:2] | passed | 0.01072 seconds |
131
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:3] | passed | 0.01359 seconds |
132
+ ./spec/server/views/approval_keys.erb_spec.rb[1:1:4] | passed | 0.01491 seconds |
133
+ ./spec/server/views/approval_keys.erb_spec.rb[1:2] | passed | 0.02502 seconds |
134
+ ./spec/server/views/approval_keys.erb_spec.rb[1:3] | passed | 0.02061 seconds |
135
+ ./spec/server/views/job_details.erb_spec.rb[1:1] | passed | 0.00957 seconds |
136
+ ./spec/server/views/job_details.erb_spec.rb[1:2] | passed | 0.0069 seconds |
137
+ ./spec/server/views/job_details.erb_spec.rb[1:3] | passed | 0.00974 seconds |
138
+ ./spec/server/views/job_details.erb_spec.rb[1:4] | passed | 0.01302 seconds |
139
+ ./spec/server/views/job_details.erb_spec.rb[1:5] | passed | 0.00842 seconds |
140
+ ./spec/server/views/job_details.erb_spec.rb[1:6] | passed | 0.00889 seconds |
141
+ ./spec/server/views/job_list.erb_spec.rb[1:1:1] | passed | 0.02364 seconds |
142
+ ./spec/server/views/job_list.erb_spec.rb[1:1:2] | passed | 0.00844 seconds |
143
+ ./spec/server/views/job_list.erb_spec.rb[1:1:3] | passed | 0.02169 seconds |
144
+ ./spec/server/views/job_list.erb_spec.rb[1:1:4] | passed | 0.01655 seconds |
145
+ ./spec/server/views/job_list.erb_spec.rb[1:1:5] | passed | 0.01163 seconds |
146
+ ./spec/server/views/job_list.erb_spec.rb[1:1:6] | passed | 0.01035 seconds |
147
+ ./spec/server/views/job_list.erb_spec.rb[1:2] | passed | 0.02258 seconds |
148
+ ./spec/server/views/job_list.erb_spec.rb[1:3] | passed | 0.02126 seconds |
149
+ ./spec/server/views/job_list.erb_spec.rb[1:4] | passed | 0.55306 seconds |
@@ -70,6 +70,26 @@ RSpec.describe "approval_keys.erb" do
70
70
  expect(last_response.header["Location"]).to match(%r{approve/job_list\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}$})
71
71
  expect(Resque).to have_received(:enqueue_to)
72
72
  end
73
+
74
+ it "should respond to /approve/pause" do
75
+ expect(queue).to receive(:pause).and_call_original
76
+
77
+ post "/approve/pause?#{{ approval_key: key }.to_param}"
78
+
79
+ expect(last_response).to be_redirect
80
+ expect(last_response.header["Location"]).to match(%r{approve/job_list\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}$})
81
+ expect(Resque).not_to have_received(:enqueue_to)
82
+ end
83
+
84
+ it "should respond to /approve/resume" do
85
+ expect(queue).to receive(:resume).and_call_original
86
+
87
+ post "/approve/resume?#{{ approval_key: key }.to_param}"
88
+
89
+ expect(last_response).to be_redirect
90
+ expect(last_response.header["Location"]).to match(%r{approve/job_list\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}$})
91
+ expect(Resque).not_to have_received(:enqueue_to)
92
+ end
73
93
  end
74
94
 
75
95
  it "should respond to /approve/job_list" do
@@ -85,6 +105,34 @@ RSpec.describe "approval_keys.erb" do
85
105
  expect(last_response.body).to match %r{action="/approve/delete_one_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
86
106
  expect(last_response.body).to match %r{action="/approve/approve_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
87
107
  expect(last_response.body).to match %r{action="/approve/approve_one_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
108
+ expect(last_response.body).to match %r{action="/approve/pause\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
109
+
110
+ expect(last_response.body).to match %r{Class</th>}
111
+ expect(last_response.body).to match %r{Enqueued</th>}
112
+ expect(last_response.body).to match %r{Parameters</th>}
113
+ expect(last_response.body).to match %r{Options</th>}
114
+
115
+ jobs.each do |job|
116
+ expect(last_response.body).to match %r{/job_details\?#{{ job_id: job.id }.to_param}}
117
+ end
118
+ end
119
+
120
+ it "should respond to /approve/job_list when paused" do
121
+ queue.pause
122
+
123
+ get "/approve/job_list?#{{ approval_key: key }.to_param}"
124
+
125
+ expect(last_response).to be_ok
126
+
127
+ expect(last_response.body).to be_include(key)
128
+
129
+ expect(last_response.body).to match %r{Approval Keys(\n *)?</a>}
130
+
131
+ expect(last_response.body).to match %r{action="/approve/delete_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
132
+ expect(last_response.body).to match %r{action="/approve/delete_one_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
133
+ expect(last_response.body).to match %r{action="/approve/approve_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
134
+ expect(last_response.body).to match %r{action="/approve/approve_one_queue\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
135
+ expect(last_response.body).to match %r{action="/approve/resume\?#{{ approval_key: key }.to_param.gsub("+", "\\\\+")}"}
88
136
 
89
137
  expect(last_response.body).to match %r{Class</th>}
90
138
  expect(last_response.body).to match %r{Enqueued</th>}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-approve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - RealNobody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-17 00:00:00.000000000 Z
11
+ date: 2019-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis