Commit ada1ea2a authored by Valery Sizov's avatar Valery Sizov

fixes for autocomplete and fixes some specs

parent a58cefc6
......@@ -8,7 +8,7 @@ class AutocompleteController < ApplicationController
@users = @users.active
@users = @users.reorder(:name)
if params[:push_code_to_protected_branches] && project
if params[:push_code_to_protected_branches].present? && project
@users = @users.to_a.select { |user| user.can?(:push_code_to_protected_branches, project) }.take(PER_PAGE)
else
@users = @users.page(params[:page]).per(PER_PAGE)
......
......@@ -386,7 +386,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
expect(page).to have_content(@user.name)
end
click_button "Submit new merge request"
click_button "Submit merge request"
click_link "Edit"
page.within 'ul.approver-list' do
......
......@@ -37,7 +37,7 @@ describe MergeRequestsHelper do
]
end
it { is_expected.to eq('JIRA-123, JIRA-456, and FOOBAR-7890') }
it { is_expected.to eq('FOOBAR-7890, JIRA-123, and JIRA-456') }
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment