diff options
-rw-r--r-- | spec/features/projects/commits/user_browses_commits_spec.rb | 2 | ||||
-rw-r--r-- | spec/support/helpers/api_helpers.rb | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/spec/features/projects/commits/user_browses_commits_spec.rb b/spec/features/projects/commits/user_browses_commits_spec.rb index fc74a370e72..818939c1b96 100644 --- a/spec/features/projects/commits/user_browses_commits_spec.rb +++ b/spec/features/projects/commits/user_browses_commits_spec.rb @@ -13,7 +13,7 @@ describe 'User browses commits' do it 'renders commit' do visit project_commit_path(project, sample_commit.id) - expect(page).to have_content(sample_commit.message.gsub!(/\s+/, ' ')) + expect(page).to have_content(sample_commit.message.gsub(/\s+/, ' ')) .and have_content("Showing #{sample_commit.files_changed_count} changed files") .and have_content('Side-by-side') end diff --git a/spec/support/helpers/api_helpers.rb b/spec/support/helpers/api_helpers.rb index e0e875186f0..aff0f87b6e4 100644 --- a/spec/support/helpers/api_helpers.rb +++ b/spec/support/helpers/api_helpers.rb @@ -32,11 +32,12 @@ module ApiHelpers end if query_string - full_path << (path.index('?') ? '&' : '?') - full_path << query_string - end + separator = path.index('?') ? '&' : '?' - full_path + full_path + separator + query_string + else + full_path + end end def expect_paginated_array_response(items) |