Permalink
Browse files

Improved the update test.

  • Loading branch information...
teozkr committed Apr 30, 2012
1 parent c69cb38 commit 97d642a20a7fe970f778d17668a312b58e54d53c
Showing with 2 additions and 0 deletions.
  1. +2 −0 nina-play/src/test/scala/TableSpec.scala
@@ -100,9 +100,11 @@ class TableSpec extends Specification {
import Play.current
DB.withConnection { implicit c =>
anorm.SQL(TestingTable.creationSQL).execute()
+ val Some(haskellId) = TestingTable where (TestingTable.name === "Haskell") get (TestingTable.id) single()
val Some(id) = TestingTable where (TestingTable.name === "Java") get (TestingTable.id) single()
TestingTable where (TestingTable.id === id) set (TestingTable.name := "Test")
TestingTable where (TestingTable.id === id) get (TestingTable.name) single() must equalTo(Some("Test"))
+ TestingTable where (TestingTable.id === haskellId) get (TestingTable.name) single() must equalTo(Some("Haskell"))
}
}
}

0 comments on commit 97d642a

Please sign in to comment.