Skip to content

Commit

Permalink
Add missing pattern match
Browse files Browse the repository at this point in the history
Summary:
`fromName` was missing a pattern to match the new `"credit-card-number"` dimension string representation.

Adding also `CreditCardNumber.Tests.tests` to the `Dimensions Tests` test group.

Reviewed By: chinmay87

Differential Revision: D13072125

fbshipit-source-id: 792727ef038d26ae12ceea909fa726692d56db6d
  • Loading branch information
potomak authored and facebook-github-bot committed Nov 15, 2018
1 parent 5de0b1f commit 39a6a4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Duckling/Dimensions/Types.hs
Expand Up @@ -50,6 +50,7 @@ fromName name = HashMap.lookup name m
where
m = HashMap.fromList
[ ("amount-of-money", This AmountOfMoney)
, ("credit-card-number", This CreditCardNumber)
, ("distance", This Distance)
, ("duration", This Duration)
, ("email", This Email)
Expand Down
2 changes: 2 additions & 0 deletions tests/Duckling/Dimensions/Tests.hs
Expand Up @@ -15,6 +15,7 @@ import Prelude
import Test.Tasty

import qualified Duckling.AmountOfMoney.Tests as AmountOfMoney
import qualified Duckling.CreditCardNumber.Tests as CreditCardNumber
import qualified Duckling.Distance.Tests as Distance
import qualified Duckling.Duration.Tests as Duration
import qualified Duckling.Email.Tests as Email
Expand All @@ -30,6 +31,7 @@ import qualified Duckling.Url.Tests as Url
tests :: TestTree
tests = testGroup "Dimensions Tests"
[ AmountOfMoney.tests
, CreditCardNumber.tests
, Distance.tests
, Duration.tests
, Email.tests
Expand Down

0 comments on commit 39a6a4c

Please sign in to comment.