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 +7,7 @@ describe Gitlab::ProjectMover do | ||
7 | FileUtils.rm_rf base_path if File.exists? base_path | 7 | FileUtils.rm_rf base_path if File.exists? base_path |
8 | FileUtils.mkdir_p base_path | 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 | @project = create(:project) | 12 | @project = create(:project) |
13 | end | 13 | end |
spec/lib/shell_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper' | @@ -2,7 +2,7 @@ require 'spec_helper' | ||
2 | 2 | ||
3 | describe Gitlab::Shell do | 3 | describe Gitlab::Shell do |
4 | let(:project) { double('Project', id: 7, path: 'diaspora') } | 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 | before do | 7 | before do |
8 | Project.stub(find: project) | 8 | Project.stub(find: project) |
@@ -13,5 +13,5 @@ describe Gitlab::Shell do | @@ -13,5 +13,5 @@ describe Gitlab::Shell do | ||
13 | it { should respond_to :add_repository } | 13 | it { should respond_to :add_repository } |
14 | it { should respond_to :remove_repository } | 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 | end | 17 | end |
spec/models/project_spec.rb
@@ -66,11 +66,6 @@ describe Project do | @@ -66,11 +66,6 @@ describe Project do | ||
66 | project.should_not be_valid | 66 | project.should_not be_valid |
67 | project.errors[:base].first.should match(/Your own projects limit is 1/) | 67 | project.errors[:base].first.should match(/Your own projects limit is 1/) |
68 | end | 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 | end | 69 | end |
75 | 70 | ||
76 | describe "Respond to" do | 71 | describe "Respond to" do |
@@ -91,7 +86,7 @@ describe Project do | @@ -91,7 +86,7 @@ describe Project do | ||
91 | 86 | ||
92 | it "should return valid url to repo" do | 87 | it "should return valid url to repo" do |
93 | project = Project.new(path: "somewhere") | 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 | end | 90 | end |
96 | 91 | ||
97 | it "returns the full web URL for this repo" do | 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 +14,14 @@ describe KeyObserver do | ||
14 | 14 | ||
15 | context :after_save do | 15 | context :after_save do |
16 | it do | 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 | @observer.after_save(@key) | 18 | @observer.after_save(@key) |
19 | end | 19 | end |
20 | end | 20 | end |
21 | 21 | ||
22 | context :after_destroy do | 22 | context :after_destroy do |
23 | it do | 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 | @observer.after_destroy(@key) | 25 | @observer.after_destroy(@key) |
26 | end | 26 | end |
27 | end | 27 | end |
spec/workers/post_receive_spec.rb
@@ -39,6 +39,6 @@ describe PostReceive do | @@ -39,6 +39,6 @@ describe PostReceive do | ||
39 | end | 39 | end |
40 | 40 | ||
41 | def pwd(project) | 41 | def pwd(project) |
42 | - File.join(Gitlab.config.gitolite.repos_path, project.path_with_namespace) | 42 | + File.join(Gitlab.config.gitlab_shell.repos_path, project.path_with_namespace) |
43 | end | 43 | end |
44 | end | 44 | end |