-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathFilesystemSpec.hs
More file actions
37 lines (33 loc) · 1.16 KB
/
FilesystemSpec.hs
File metadata and controls
37 lines (33 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module FilesystemSpec
( spec
)
where
import Prelude
import Common
import Database.Schema.Migrations.Filesystem
import Database.Schema.Migrations.Store (MigrationStore (..))
import Test.Hspec
spec :: Spec
spec = do
describe "getMigrations" $ do
it "gets all migrations in the store" $ do
let store =
filesystemStore $
FSStore {storePath = testFile "migration_parsing"}
migrations <- getMigrations store
migrations
`shouldMatchList` [ "invalid_field_name"
, "invalid_missing_required_fields"
, "invalid_syntax"
, "invalid_timestamp"
, "valid_full"
, "valid_full_fractional_ts"
, "valid_no_depends"
, "valid_no_desc"
, "valid_no_revert"
, "valid_no_timestamp"
, "valid_with_comments"
, "valid_with_comments2"
, "valid_with_colon"
, "valid_with_multiline_deps"
]