summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-10-18 19:28:45 -0600
committermo khan <mo@mokhan.ca>2014-10-18 19:28:45 -0600
commitcb7b07bb710f2a7344555062f7ebd70a3cb481e6 (patch)
treed5686b2f059901f47ae7ed478efe7b2bb34504ee /spec/services
parent6a07f43e2f8b2ff287ee70bccf879219b5b09cd8 (diff)
add search by name and description.
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/application/all_cakes_query_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/application/all_cakes_query_spec.rb b/spec/services/application/all_cakes_query_spec.rb
index 4e2dbb6a..b2f25120 100644
--- a/spec/services/application/all_cakes_query_spec.rb
+++ b/spec/services/application/all_cakes_query_spec.rb
@@ -37,5 +37,11 @@ describe AllCakesQuery do
expect(cakes).to include(cake)
expect(cakes).to_not include(cookie)
end
+
+ it 'returns all cakes that match the search query' do
+ cakes = subject.fetch(q: cake.name[0..2])
+ expect(cakes).to include(cake)
+ expect(cakes).to_not include(cookie)
+ end
end
end