Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Milan
diaspora
Commits
548b0d81
Commit
548b0d81
authored
Apr 01, 2015
by
Jonne Haß
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rescue correct constant in Workers::ReceiveLocalBatch
Fixes #5834
parent
5c78ab68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
app/workers/receive_local_batch.rb
app/workers/receive_local_batch.rb
+1
-1
spec/workers/receive_local_batch_spec.rb
spec/workers/receive_local_batch_spec.rb
+14
-0
No files found.
app/workers/receive_local_batch.rb
View file @
548b0d81
...
...
@@ -10,7 +10,7 @@ module Workers
object
=
object_class_string
.
constantize
.
find
(
object_id
)
receiver
=
Postzord
::
Receiver
::
LocalBatch
.
new
(
object
,
recipient_user_ids
)
receiver
.
perform!
rescue
ActiveRecord
::
NotFound
# Already deleted before the job could run
rescue
ActiveRecord
::
Record
NotFound
# Already deleted before the job could run
end
end
end
spec/workers/receive_local_batch_spec.rb
0 → 100644
View file @
548b0d81
require
"spec_helper"
describe
Workers
::
ReceiveLocalBatch
do
it
"calls the postzord"
do
post
=
double
allow
(
Post
).
to
receive
(
:find
).
with
(
1
).
and_return
(
post
)
zord
=
double
expect
(
Postzord
::
Receiver
::
LocalBatch
).
to
receive
(
:new
).
with
(
post
,
[
2
]).
and_return
(
zord
)
expect
(
zord
).
to
receive
(
:perform!
)
Workers
::
ReceiveLocalBatch
.
new
.
perform
(
"Post"
,
1
,
[
2
])
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment