Skip to content

Commit

Permalink
added linked example per #5
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Aug 1, 2014
1 parent e95e977 commit 59ae42c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/scala/ResourcesTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ class ResourcesTest extends FlatSpec with ShouldMatchers with TestBase {
report.isSuccess should be (true)
}

it should "validate a spec with linked resources" in {
val json = Source.fromFile("samples/v2.0/json/resources/resourceWithLinkedDefinitions.json").mkString
val data = JsonLoader.fromString(json)
val report = jsonSchema.validate(data)
if(report.isSuccess == false)
println(report)
report.isSuccess should be (true)
}

it should "validate the wordnik petstore" in {
val json = Source.fromFile("examples/wordnik/petstore.json").mkString
val data = JsonLoader.fromString(json)
Expand Down

0 comments on commit 59ae42c

Please sign in to comment.