Commit 329c1c64 authored by Fjen Undso's avatar Fjen Undso
Browse files

dont load sample data when testing

parent eb96b4fd
......@@ -10,7 +10,7 @@ public class Global extends GlobalSettings {
public void onStart(Application app) {
Logger.info("Application has started");
// Check if the database is empty
if (Session.find.findRowCount() == 0) {
if (Session.find.findRowCount() == 0 && !app.isTest()) {
// Fill database with sample data
List list = (List) Yaml.load("test-data.yml");
Ebean.save(list);
......
......@@ -2,7 +2,9 @@ package controllers;
import java.util.List;
import models.QuestionAnswer;
import models.Session;
import models.Vote;
import play.libs.Json;
import play.mvc.BodyParser;
import play.mvc.Controller;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment