1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

Test null on both sides in JSON payload

This commit is contained in:
Timothy Clem 2017-12-11 12:59:14 -08:00
parent 2f6c669899
commit 47ce5a63c1
2 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,10 @@ spec = parallel $ do
h <- openFile "test/fixtures/input/diff-no-language.json" ReadMode
readBlobsFromHandle h `shouldThrow` (== ExitFailure 1)
it "throws if null on before and after" $ do
h <- openFile "test/fixtures/input/diff-null-both-sides.json" ReadMode
readBlobPairsFromHandle h `shouldThrow` (== ExitFailure 1)
describe "readBlobsFromHandle" $ do
it "returns blobs for valid JSON encoded parse input" $ do
h <- openFile "test/fixtures/input/parse.json" ReadMode

View File

@ -0,0 +1,6 @@
{
"blobs": [{
"before": null,
"after": null
}]
}