spec/api/query/scope_spec.rb in sunspot-1.0.1 vs spec/api/query/scope_spec.rb in sunspot-1.0.2
- old
+ new
@@ -13,9 +13,16 @@
with :title, 'My Pet Post'
end
connection.should have_last_search_including(:fq, 'title_ss:My\ Pet\ Post')
end
+ it 'scopes by exact match with a special string' do
+ session.search Post do
+ with :title, 'OR'
+ end
+ connection.should have_last_search_including(:fq, 'title_ss:"OR"')
+ end
+
it 'scopes by exact match with time' do
time = Time.parse('1983-07-08 05:00:00 -0400')
session.search Post do
with :published_at, time
end