diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2015-01-24 11:02:58 -0700 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2015-02-14 11:09:23 -0700 |
commit | 76aad9b76ed756ca9ba2cbcdb399c815e542b3ae (patch) | |
tree | 7226e0ce64796abbf4848582baed8d173ddecd14 /spec/services | |
parent | 5725b6daad2f403f13112cfcafa5b45ac126c0ca (diff) | |
download | gitlab-ce-76aad9b76ed756ca9ba2cbcdb399c815e542b3ae.tar.gz |
Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:
* Use nested resources to avoid slashes in arguments to path helpers.
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/git_push_service_spec.rb | 12 | ||||
-rw-r--r-- | spec/services/projects/transfer_service_spec.rb | 6 |
2 files changed, 14 insertions, 4 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index 9d0e41e4e8a..9924935094e 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -79,7 +79,17 @@ describe GitPushService do it { is_expected.to include(id: @commit.id) } it { is_expected.to include(message: @commit.safe_message) } it { is_expected.to include(timestamp: @commit.date.xmlschema) } - it { is_expected.to include(url: "#{Gitlab.config.gitlab.url}/#{project.to_param}/commit/#{@commit.id}") } + it do + is_expected.to include( + url: [ + Gitlab.config.gitlab.url, + project.namespace.to_param, + project.to_param, + 'commit', + @commit.id + ].join('/') + ) + end context "with a author" do subject { @push_data[:commits].first[:author] } diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb index 46fb5f5fae5..5650626fb18 100644 --- a/spec/services/projects/transfer_service_spec.rb +++ b/spec/services/projects/transfer_service_spec.rb @@ -8,7 +8,7 @@ describe Projects::TransferService do context 'namespace -> namespace' do before do group.add_owner(user) - @result = transfer_project(project, user, namespace_id: group.id) + @result = transfer_project(project, user, new_namespace_id: group.id) end it { expect(@result).to be_truthy } @@ -17,7 +17,7 @@ describe Projects::TransferService do context 'namespace -> no namespace' do before do - @result = transfer_project(project, user, namespace_id: nil) + @result = transfer_project(project, user, new_namespace_id: nil) end it { expect(@result).not_to be_nil } # { result.should be_false } passes on nil @@ -27,7 +27,7 @@ describe Projects::TransferService do context 'namespace -> not allowed namespace' do before do - @result = transfer_project(project, user, namespace_id: group.id) + @result = transfer_project(project, user, new_namespace_id: group.id) end it { expect(@result).not_to be_nil } # { result.should be_false } passes on nil |