wasp/waspc/e2e-test/Tests/WaspMigrateTest.hs

29 lines
685 B
Haskell
Raw Normal View History

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"
]