summaryrefslogtreecommitdiff
path: root/spec/observers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-05 12:47:50 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-05 12:47:50 +0200
commit70e3bffd95eb5736dd108e0836abaa85a2f1c742 (patch)
treeeffcda0ec2a1b5e8437740cfe848226abd3200a2 /spec/observers
parent39e37677f291c344e25583916a1811a052e38db6 (diff)
downloadgitlab-ce-70e3bffd95eb5736dd108e0836abaa85a2f1c742.tar.gz
Fixed: post-receive, project remove, tests
Diffstat (limited to 'spec/observers')
-rw-r--r--spec/observers/key_observer_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/observers/key_observer_spec.rb b/spec/observers/key_observer_spec.rb
index 11f975cc57d..0a886a57afd 100644
--- a/spec/observers/key_observer_spec.rb
+++ b/spec/observers/key_observer_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe KeyObserver do
before do
@key = double('Key',
- identifier: 'admin_654654',
+ shell_id: 'key-32',
key: '== a vaild ssh key',
projects: [],
is_deploy_key: false
@@ -14,14 +14,14 @@ describe KeyObserver do
context :after_save do
it do
- GitoliteWorker.should_receive(:perform_async).with(:set_key, @key.identifier, @key.key, @key.projects.map(&:id))
+ GitoliteWorker.should_receive(:perform_async).with(:add_key, @key.shell_id, @key.key)
@observer.after_save(@key)
end
end
context :after_destroy do
it do
- GitoliteWorker.should_receive(:perform_async).with(:remove_key, @key.identifier, @key.projects.map(&:id))
+ GitoliteWorker.should_receive(:perform_async).with(:remove_key, @key.shell_id, @key.key)
@observer.after_destroy(@key)
end
end