Add unit tests for main model parts (#310)

Add tests for following models:
- Blog
- Instance
- Media
- User
This commit is contained in:
fdb-hiroshima
2018-11-24 12:44:17 +01:00
committed by Baptiste Gelez
parent 0b9727ed28
commit 8a4702df92
30 changed files with 3779 additions and 1123 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ jobs:
name: "Test with potgresql backend"
env:
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume_tests
- RUSTFLAGS='-C link-dead-code'
- RUSTFLAGS='-C link-dead-code' RUST_TEST_THREADS=1
before_script: psql -c 'create database plume_tests;' -U postgres
script:
- |
@@ -49,7 +49,7 @@ jobs:
name: "Test with Sqlite backend"
env:
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
- RUSTFLAGS='-C link-dead-code'
- RUSTFLAGS='-C link-dead-code' RUST_TEST_THREADS=1
script:
- |
cargo test --features "${FEATURES}" --no-default-features --all &&