Created
March 1, 2013 11:25
-
-
Save nicmarti/5064048 to your computer and use it in GitHub Desktop.
Play2 and Spec simple test - Demo for Confoo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models | |
import org.specs2.mutable._ | |
import play.api.test._ | |
import play.api.test.Helpers._ | |
class OriginSpecs extends Specification { | |
"An Origin" should { | |
"returns the slug for a valid origin" in { | |
running(FakeApplication()) { | |
Origin.getSlug(380) mustEqual Some("from-london") | |
Origin.getSlug(1) mustEqual Some("from-paris") | |
Origin.getSlug(-9999) mustEqual None | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment