test/convertor_test.rb in boogex-0.1.0 vs test/convertor_test.rb in boogex-0.1.1
- old
+ new
@@ -33,6 +33,13 @@
string = '((im AND researching) AND travelling)'
expecting = "AND([AND(['(?:im)','(?:researching)']),'(?:travelling)'])"
result = Boogex.convert(string)
assert_equal expecting, result
end
+
+ it 'understands double embedded AND' do
+ string = 'Peeps OR ((dude OR roos) AND (what OR Footy))'
+ expecting = "Peeps|AND(['(?:dude|roos)','(?:what|Footy)'])"
+ result = Boogex.convert(string)
+ assert_equal expecting, result
+ end
end