Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
cf72ef5323e6
Commit
fe42de3a
authored
Sep 15, 2015
by
Kamil Trzcinski
Browse files
Fix: features/ci/admin/runners_spec.rb
parent
b10bf7a8d7f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/models/ci/runner.rb
View file @
cf72ef53
...
...
@@ -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
...
...
app/views/ci/admin/runners/index.html.haml
View file @
cf72ef53
...
...
@@ -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'
...
...
app/views/ci/admin/runners/show.html.haml
View file @
cf72ef53
...
...
@@ -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'
...
...
spec/features/ci/admin/runners_spec.rb
View file @
cf72ef53
...
...
@@ -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"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment