Commit fe42de3a authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix: features/ci/admin/runners_spec.rb

parent b10bf7a8d7f3
......@@ -37,7 +37,7 @@ class Runner < ActiveRecord::Base
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
......
......@@ -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'
......
......@@ -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'
......
......@@ -23,8 +23,9 @@
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 '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") }
......
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