Skip to content

Instantly share code, notes, and snippets.

@dhoss
Created August 25, 2015 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhoss/fe509b328087e7ccd035 to your computer and use it in GitHub Desktop.
Save dhoss/fe509b328087e7ccd035 to your computer and use it in GitHub Desktop.
reducing with... stuff
"retrieve the correct page when specified" in new WithApplication
with RepositoryTable
with CommitTable
with ProjectTable
with WithDatabaseConfig
with DBCleanup
with DBFixtures {
import driver.api._
//create an instance of the table
val Projects = TableQuery[Projects]
val Repositories = TableQuery[Repositories]
val Commits = TableQuery[Commits]
val dal = new DAL()
val fixture = new Fixtures()
fixture.populate()
val project = Await.result(db.run(Projects.result.head), Duration.Inf)
dal.commitsFor(project.name, Option(2)) must have length(be_<=(100))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment