Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
using fourmolu
  • Loading branch information
MoritzR committed Oct 19, 2023
1 parent f74ff97 commit e1b148c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/PromptSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module PromptSpec (spec) where

import App (Env (..), PromptResult (Result, Skip))
import Config.AppConfig (AppConfig (..))
import Config.Files (defaultTemplateFile)
import Config.YamlConfig (Filling (Filling, match), LedgerConfig (..), fill)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Reader (ReaderT (runReaderT))
Expand All @@ -13,7 +14,6 @@ import Data.Time.Calendar (Day (ModifiedJulianDay))
import Prompt (transactionsToLedger)
import Test.Syd (Spec, describe, goldenTextFile, it, shouldBe, shouldContain)
import Transactions (Amount (Amount), Transaction (..))
import Config.Files (defaultTemplateFile)

spec :: Spec
spec = do
Expand Down Expand Up @@ -65,11 +65,13 @@ spec = do
let env =
testEnv
{ readFile = const $ return "; md5sum: 5abd61b9de15c3115519a5f1b4ac7992"
, config = testConfig {
ledgerConfig = testConfig.ledgerConfig {
md5 = ["purpose"]
}
}
, config =
testConfig
{ ledgerConfig =
testConfig.ledgerConfig
{ md5 = ["purpose"]
}
}
, promptForEntry = \_templateMap key -> do
liftIO $ modifyIORef ioRef (++ [key])
return $ Result "test input"
Expand Down Expand Up @@ -139,7 +141,7 @@ spec = do
, appendFile = \_filePath text -> modifyIORef ioRef (<> text)
}

runToLedger [testTransaction, testTransaction{amount = Amount 0.01}, testTransaction {amount = Amount 6.2}] env
runToLedger [testTransaction, testTransaction{amount = Amount 0.01}, testTransaction{amount = Amount 6.2}] env
readIORef ioRef

goldenTextFile "test/files/snapshot.ledger" getSnapshot
Expand Down

0 comments on commit e1b148c

Please sign in to comment.