These are chat archives for etorreborre/specs2

Feb 2016
Vaidas Žilionis
Feb 02 2016 13:59
anyone good at jsonMatchers? I tried to write test for my scenario and after adding duoble quotes to json i get exeption "could not parse"
tried to look make simple test like in example it fails too
val name = """shirt "as" 12"""
val json = """{"products":[{"name":"shirt \"as\" 12","price":10, "ids":["1", "2", "3"]},{"name":"shoe","price":5}]}"""
json must haveProducts(
aProductWith(name = name, price = 10) and /("ids").andHave(exactly("1", "2", "3")),
aProductWith(name = "shoe", price = 5)
I am very new with scala, so it's so confusing...
Eric Torreborre
Feb 02 2016 14:08
I will try to have a look at that tonight
Vaidas Žilionis
Feb 02 2016 14:25
just another example which works
json must /("products" -> /# (0) /("name" -> """shirt "as" 12"""))
looks like traversable "allOf" problem