diff options
author | Rémy Coutable <remy@rymai.me> | 2016-03-16 12:16:49 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-03-16 12:16:49 +0300 |
commit | cacd3373ff7d5f3c8cc5774527e2474f9a28fc92 (patch) | |
tree | 58e4426905d64660d8c04020514a86bdb4306264 /spec/workers/delete_user_worker_spec.rb | |
parent | 1e8bf60f40426de9cc6671a42019237688a848ac (diff) | |
parent | 374037b8a326b82a7787b2e29da820aa9c4390b3 (diff) |
Merge remote-tracking branch 'origin/master' into 8-6-stable
Diffstat (limited to 'spec/workers/delete_user_worker_spec.rb')
-rw-r--r-- | spec/workers/delete_user_worker_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/workers/delete_user_worker_spec.rb b/spec/workers/delete_user_worker_spec.rb new file mode 100644 index 00000000000..14c56521280 --- /dev/null +++ b/spec/workers/delete_user_worker_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe DeleteUserWorker do + let!(:user) { create(:user) } + let!(:current_user) { create(:user) } + + it "calls the DeleteUserWorker with the params it was given" do + expect_any_instance_of(DeleteUserService).to receive(:execute). + with(user, {}) + + DeleteUserWorker.new.perform(current_user.id, user.id) + end + + it "uses symbolized keys" do + expect_any_instance_of(DeleteUserService).to receive(:execute). + with(user, test: "test") + + DeleteUserWorker.new.perform(current_user.id, user.id, "test" => "test") + end +end |