Allow groups to be searched by URL

This commit is contained in:
Rohan Mitchell
2016-07-06 11:04:53 +10:00
parent d6f21b24da
commit f09cd9e477
2 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
Darkswarm.controller "GroupsCtrl", ($scope, Groups) ->
Darkswarm.controller "GroupsCtrl", ($scope, Groups, Search) ->
$scope.Groups = Groups
$scope.order = 'position'
$scope.query = Search.search()
$scope.$watch "query", (query)->
Search.search query

View File

@@ -12,8 +12,8 @@ feature 'Groups', js: true do
page.should have_content group.name
end
it "renders enterprise modals for groups" do
visit groups_path
page.should have_content group.name
it "searches by URL" do
visit groups_path(anchor: "/?query=xyzzy")
expect(page).to have_content "No groups found"
end
end