Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Anorm BadPath error
- [BadPath: path parameter: Invalid path ' - could not find datasource for default': Token not allowed in path expression: '-' (you can double-quote this token if you really want it here)]
- DB.withConnection { implicit c =>
- Create Table IF NOT EXISTS SegmentCategories(
- id bigint(20) NOT NULL AUTO_INCREMENT,
- name varchar(255) NOT NULL,
- PRIMARY KEY (id)
- );
- insert into SegmentCategories (name) values ('Restaurants');
- insert into SegmentCategories (name) values ('Hotels');
- evolutions/
- default/
- test/
- db.default.driver=${?cloud.services.default-db.connection.driver}
- db.default.url=${?cloud.services.default-db.connection.url}
- db.default.user=${?cloud.services.default-db.connection.username}
- db.default.password=${?cloud.services.default-db.connection.password}
- db.test.driver=org.h2.Driver
- db.test.url="jdbc:h2:mem:play"
- "be listed" in {
- running(FakeApplication(additionalConfiguration = inMemoryDatabase("test"))) {
- val segmentCategories = SegmentCategoryModel.list()
- segmentCategories.total must equalTo(2)
- segmentCategories.items must have length(2)
- }
- }
Add Comment
Please, Sign In to add comment