Skip to content

Commit

Permalink
[#1905] Allow search on resource name field.
Browse files Browse the repository at this point in the history
Adds test to new_tests.
  • Loading branch information
george committed Nov 8, 2014
1 parent 96c1d9d commit 1c30fd3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ckan/new_tests/logic/action/test_get.py
Expand Up @@ -569,6 +569,16 @@ def test_group_show_does_not_show_private_datasets(self):
in group['packages']], (
"group_show() should never show private datasets")

def test_package_search_on_resource_name(self):
'''
package_search() should allow searching on resource name field.
'''
resource_name = 'resource_abc'
package = factories.Resource(name=resource_name)

search_result = helpers.call_action('package_search', q='resource_abc')
assert(search_result['results'][0]['resources'][0]['name'] == resource_name)


class TestBadLimitQueryParameters(object):
'''test class for #1258 non-int query parameters cause 500 errors
Expand Down

0 comments on commit 1c30fd3

Please sign in to comment.