diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2019-01-13 19:24:31 +0300 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2019-01-14 06:02:55 +0300 |
commit | d32aec06fe2d6ee0b2b0c0d1ca8cfd9bab14e4e7 (patch) | |
tree | 6449d068a342509222709755177034c672f58236 /spec/requests/api/issues_spec.rb | |
parent | 1161c99e5c5a6e717127b83665de00068d810e0e (diff) |
Add 'in' filter that modifies scope of 'search' filter to issues and merge requests API
Diffstat (limited to 'spec/requests/api/issues_spec.rb')
-rw-r--r-- | spec/requests/api/issues_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index ba7930f6c9d..707b91e3b2a 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -208,6 +208,18 @@ describe API::Issues do expect_paginated_array_response(issue.id) end + it 'returns issues matching given search string for title and scoped in title' do + get api("/issues", user), params: { search: issue.title, in: 'title' } + + expect_paginated_array_response(issue.id) + end + + it 'returns an empty array if no issue matches given search string for title and scoped in description' do + get api("/issues", user), params: { search: issue.title, in: 'description' } + + expect_paginated_array_response([]) + end + it 'returns issues matching given search string for description' do get api("/issues", user), params: { search: issue.description } |