Skip to content
Permalink
Browse files

Add missing pattern match

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 39a6a4c6ec53cc532707083d5f370004d021c183
Showing with 3 additions and 0 deletions.
  1. +1 −0 Duckling/Dimensions/Types.hs
  2. +2 −0 tests/Duckling/Dimensions/Tests.hs
@@ -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)
@@ -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
@@ -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

0 comments on commit 39a6a4c

Please sign in to comment.
You can’t perform that action at this time.