Guest User

Untitled

a guest
Jan 12th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. Anorm BadPath error
  2. [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)]
  3.  
  4. DB.withConnection { implicit c =>
  5.  
  6. Create Table IF NOT EXISTS SegmentCategories(
  7. id bigint(20) NOT NULL AUTO_INCREMENT,
  8. name varchar(255) NOT NULL,
  9. PRIMARY KEY (id)
  10. );
  11.  
  12. insert into SegmentCategories (name) values ('Restaurants');
  13. insert into SegmentCategories (name) values ('Hotels');
  14.  
  15. evolutions/
  16. default/
  17. test/
  18.  
  19. db.default.driver=${?cloud.services.default-db.connection.driver}
  20. db.default.url=${?cloud.services.default-db.connection.url}
  21. db.default.user=${?cloud.services.default-db.connection.username}
  22. db.default.password=${?cloud.services.default-db.connection.password}
  23. db.test.driver=org.h2.Driver
  24. db.test.url="jdbc:h2:mem:play"
  25.  
  26. "be listed" in {
  27. running(FakeApplication(additionalConfiguration = inMemoryDatabase("test"))) {
  28.  
  29. val segmentCategories = SegmentCategoryModel.list()
  30.  
  31. segmentCategories.total must equalTo(2)
  32. segmentCategories.items must have length(2)
  33.  
  34. }
  35. }
Add Comment
Please, Sign In to add comment