Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-15 23:13:01 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-15 23:15:28 +0300
commitfe42de3a48a43ccea2bb60c8dcdb4d6665a72eef (patch)
treef28fc4db3830d081bbbdbb8e077e5cd5bae2e9ce
parent29b3279a954825541bb0cfb14b6fe0a92c867c4e (diff)
Fix: features/ci/admin/runners_spec.rb
-rw-r--r--app/models/ci/runner.rb2
-rw-r--r--app/views/ci/admin/runners/index.html.haml2
-rw-r--r--app/views/ci/admin/runners/show.html.haml2
-rw-r--r--spec/features/ci/admin/runners_spec.rb10
4 files changed, 9 insertions, 7 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb
index 79c81df5eb2..1e9f78a3748 100644
--- a/app/models/ci/runner.rb
+++ b/app/models/ci/runner.rb
@@ -37,7 +37,7 @@ module Ci
acts_as_taggable
def self.search(query)
- where('LOWER(runners.token) LIKE :query OR LOWER(runners.description) like :query',
+ where('LOWER(ci_runners.token) LIKE :query OR LOWER(ci_runners.description) like :query',
query: "%#{query.try(:downcase)}%")
end
diff --git a/app/views/ci/admin/runners/index.html.haml b/app/views/ci/admin/runners/index.html.haml
index d578ff922ad..b9d6703ff41 100644
--- a/app/views/ci/admin/runners/index.html.haml
+++ b/app/views/ci/admin/runners/index.html.haml
@@ -25,7 +25,7 @@
.append-bottom-20.clearfix
.pull-left
- = form_tag ci_admin_runners_path, class: 'form-inline', method: :get do
+ = form_tag ci_admin_runners_path, id: 'runners-search', class: 'form-inline', method: :get do
.form-group
= search_field_tag :search, params[:search], class: 'form-control', placeholder: 'Runner description or token'
= submit_tag 'Search', class: 'btn'
diff --git a/app/views/ci/admin/runners/show.html.haml b/app/views/ci/admin/runners/show.html.haml
index 0270da53349..24e0ad3b070 100644
--- a/app/views/ci/admin/runners/show.html.haml
+++ b/app/views/ci/admin/runners/show.html.haml
@@ -74,7 +74,7 @@
%tr
%td
- = form_tag ci_admin_runner_path(@runner), class: 'form-inline', method: :get do
+ = form_tag ci_admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
.form-group
= search_field_tag :search, params[:search], class: 'form-control'
= submit_tag 'Search', class: 'btn'
diff --git a/spec/features/ci/admin/runners_spec.rb b/spec/features/ci/admin/runners_spec.rb
index 644d48ac298..b25121f0806 100644
--- a/spec/features/ci/admin/runners_spec.rb
+++ b/spec/features/ci/admin/runners_spec.rb
@@ -23,8 +23,9 @@ describe "Admin Runners" do
FactoryGirl.create :ci_runner, description: 'foo'
FactoryGirl.create :ci_runner, description: 'bar'
- fill_in 'search', with: 'foo'
- click_button 'Search'
+ search_form = find('#runners-search')
+ search_form.fill_in 'search', with: 'foo'
+ search_form.click_button 'Search'
end
it { expect(page).to have_content("foo") }
@@ -52,8 +53,9 @@ describe "Admin Runners" do
describe 'search' do
before do
- fill_in 'search', with: 'foo'
- click_button 'Search'
+ search_form = find('#runner-projects-search')
+ search_form.fill_in 'search', with: 'foo'
+ search_form.click_button 'Search'
end
it { expect(page).to have_content("foo") }