diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-07 03:08:07 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-07 03:08:07 -0800 |
commit | 12b952b6513ad7dec69c6f2b19fb27e352c89ec6 (patch) | |
tree | b6c77e08e7581d80a3955cb9ec3cb71cbeab979c | |
parent | 502f771dba6e9abd67350cfe88ec1d8ba31267d9 (diff) | |
parent | de90432d73c86a16e2b1dc3eec8ddfe03a26c9f8 (diff) | |
download | gitlab-shell-12b952b6513ad7dec69c6f2b19fb27e352c89ec6.tar.gz |
Merge pull request #3 from redorkulated/patch-1
Read auth keys file from config
-rw-r--r-- | spec/gitlab_keys_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/gitlab_keys_spec.rb b/spec/gitlab_keys_spec.rb index 1c557aa..c986558 100644 --- a/spec/gitlab_keys_spec.rb +++ b/spec/gitlab_keys_spec.rb @@ -20,7 +20,7 @@ describe GitlabKeys do end it "should receive valid cmd" do - valid_cmd = "echo 'command=\"#{ROOT_PATH}/bin/gitlab-shell key-741\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3NzaDAxx2E' >> /home/git/.ssh/authorized_keys" + valid_cmd = "echo 'command=\"#{ROOT_PATH}/bin/gitlab-shell key-741\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3NzaDAxx2E' >> #{GitlabConfig.new.auth_file}" @gl_keys.should_receive(:system).with(valid_cmd) @gl_keys.send :add_key end @@ -33,7 +33,7 @@ describe GitlabKeys do end it "should receive valid cmd" do - valid_cmd = "sed -i '/key-741/d' /home/git/.ssh/authorized_keys" + valid_cmd = "sed -i '/key-741/d' #{GitlabConfig.new.auth_file}" @gl_keys.should_receive(:system).with(valid_cmd) @gl_keys.send :rm_key end |