Commit ab0cfc00367a60cfe9cc488521bf55882d54769a
1 parent
2a1fac9e
Exists in
master
and in
4 other branches
fixing tests after refactoring
Showing
5 changed files
with
7 additions
and
12 deletions
Show diff stats
spec/lib/project_mover_spec.rb
... | ... | @@ -7,7 +7,7 @@ describe Gitlab::ProjectMover do |
7 | 7 | FileUtils.rm_rf base_path if File.exists? base_path |
8 | 8 | FileUtils.mkdir_p base_path |
9 | 9 | |
10 | - Gitlab.config.gitolite.stub(repos_path: base_path) | |
10 | + Gitlab.config.gitlab_shell.stub(repos_path: base_path) | |
11 | 11 | |
12 | 12 | @project = create(:project) |
13 | 13 | end | ... | ... |
spec/lib/shell_spec.rb
... | ... | @@ -2,7 +2,7 @@ require 'spec_helper' |
2 | 2 | |
3 | 3 | describe Gitlab::Shell do |
4 | 4 | let(:project) { double('Project', id: 7, path: 'diaspora') } |
5 | - let(:gitolite) { Gitlab::Shell.new } | |
5 | + let(:gitlab_shell) { Gitlab::Shell.new } | |
6 | 6 | |
7 | 7 | before do |
8 | 8 | Project.stub(find: project) |
... | ... | @@ -13,5 +13,5 @@ describe Gitlab::Shell do |
13 | 13 | it { should respond_to :add_repository } |
14 | 14 | it { should respond_to :remove_repository } |
15 | 15 | |
16 | - it { gitolite.url_to_repo('diaspora').should == Gitlab.config.gitolite.ssh_path_prefix + "diaspora.git" } | |
16 | + it { gitlab_shell.url_to_repo('diaspora').should == Gitlab.config.gitlab_shell.ssh_path_prefix + "diaspora.git" } | |
17 | 17 | end | ... | ... |
spec/models/project_spec.rb
... | ... | @@ -66,11 +66,6 @@ describe Project do |
66 | 66 | project.should_not be_valid |
67 | 67 | project.errors[:base].first.should match(/Your own projects limit is 1/) |
68 | 68 | end |
69 | - | |
70 | - it "should not allow 'gitolite-admin' as repo name" do | |
71 | - should allow_value("blah").for(:path) | |
72 | - should_not allow_value("gitolite-admin").for(:path) | |
73 | - end | |
74 | 69 | end |
75 | 70 | |
76 | 71 | describe "Respond to" do |
... | ... | @@ -91,7 +86,7 @@ describe Project do |
91 | 86 | |
92 | 87 | it "should return valid url to repo" do |
93 | 88 | project = Project.new(path: "somewhere") |
94 | - project.url_to_repo.should == Gitlab.config.gitolite.ssh_path_prefix + "somewhere.git" | |
89 | + project.url_to_repo.should == Gitlab.config.gitlab_shell.ssh_path_prefix + "somewhere.git" | |
95 | 90 | end |
96 | 91 | |
97 | 92 | it "returns the full web URL for this repo" do | ... | ... |
spec/observers/key_observer_spec.rb
... | ... | @@ -14,14 +14,14 @@ describe KeyObserver do |
14 | 14 | |
15 | 15 | context :after_save do |
16 | 16 | it do |
17 | - GitoliteWorker.should_receive(:perform_async).with(:add_key, @key.shell_id, @key.key) | |
17 | + GitlabShellWorker.should_receive(:perform_async).with(:add_key, @key.shell_id, @key.key) | |
18 | 18 | @observer.after_save(@key) |
19 | 19 | end |
20 | 20 | end |
21 | 21 | |
22 | 22 | context :after_destroy do |
23 | 23 | it do |
24 | - GitoliteWorker.should_receive(:perform_async).with(:remove_key, @key.shell_id, @key.key) | |
24 | + GitlabShellWorker.should_receive(:perform_async).with(:remove_key, @key.shell_id, @key.key) | |
25 | 25 | @observer.after_destroy(@key) |
26 | 26 | end |
27 | 27 | end | ... | ... |
spec/workers/post_receive_spec.rb