mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-29 20:12:28 +03:00
29 lines
685 B
Haskell
29 lines
685 B
Haskell
module Tests.WaspMigrateTest (waspMigrate) where
|
|
|
|
import GoldenTest (GoldenTest, makeGoldenTest)
|
|
import ShellCommands
|
|
( appendToWaspFile,
|
|
cdIntoCurrentProject,
|
|
waspCliCompile,
|
|
waspCliMigrate,
|
|
waspCliNew,
|
|
)
|
|
|
|
waspMigrate :: GoldenTest
|
|
waspMigrate = do
|
|
let entityDecl =
|
|
"entity Task {=psl \n\
|
|
\ id Int @id @default(autoincrement()) \n\
|
|
\ description String \n\
|
|
\ isDone Boolean @default(false) \n\
|
|
\ psl=} \n"
|
|
|
|
makeGoldenTest "waspMigrate" $
|
|
sequence
|
|
[ waspCliNew,
|
|
cdIntoCurrentProject,
|
|
waspCliCompile,
|
|
appendToWaspFile entityDecl,
|
|
waspCliMigrate "foo"
|
|
]
|