Solve elm test bugs from moving user
parent
8b2db7bff6
commit
3566d3ee7a
|
@ -8,6 +8,7 @@ import Internal.Values.Context as Context exposing (Context, Versions)
|
|||
import Set
|
||||
import Test exposing (..)
|
||||
import Test.Tools.Timestamp as TestTimestamp
|
||||
import Test.Values.User as TestUser
|
||||
|
||||
|
||||
fuzzer : Fuzzer Context
|
||||
|
@ -17,22 +18,25 @@ fuzzer =
|
|||
maybeString =
|
||||
Fuzz.maybe Fuzz.string
|
||||
in
|
||||
Fuzz.map8 (\a b c d ( e, f ) ( g, h ) ( i, j ) ( k, l ) -> Context a b c d e f g h i j k l)
|
||||
Fuzz.map8 (\a b c ( d, e ) ( f, g ) ( h, i ) ( j, k ) ( l, m ) -> Context a b c d e f g h i j k l m)
|
||||
(Fuzz.constant <| Hashdict.empty .value)
|
||||
maybeString
|
||||
maybeString
|
||||
maybeString
|
||||
(Fuzz.pair
|
||||
maybeString
|
||||
(Fuzz.maybe TestTimestamp.fuzzer)
|
||||
maybeString
|
||||
)
|
||||
(Fuzz.pair
|
||||
maybeString
|
||||
maybeString
|
||||
)
|
||||
(Fuzz.pair
|
||||
Fuzz.string
|
||||
maybeString
|
||||
)
|
||||
(Fuzz.pair
|
||||
maybeString
|
||||
maybeString
|
||||
(Fuzz.maybe TestUser.fuzzer)
|
||||
)
|
||||
(Fuzz.pair
|
||||
maybeString
|
||||
|
|
|
@ -25,7 +25,7 @@ suite =
|
|||
[ fuzz Fuzz.string
|
||||
"currentVersion"
|
||||
(\s ->
|
||||
{ content = s, serverName = "" }
|
||||
{ content = s, serverName = "", user = Nothing }
|
||||
|> Envelope.init
|
||||
|> Envelope.extractSettings .currentVersion
|
||||
|> Expect.equal Default.currentVersion
|
||||
|
@ -33,7 +33,7 @@ suite =
|
|||
, fuzz Fuzz.string
|
||||
"deviceName"
|
||||
(\s ->
|
||||
{ content = s, serverName = "" }
|
||||
{ content = s, serverName = "", user = Nothing }
|
||||
|> Envelope.init
|
||||
|> Envelope.extractSettings .deviceName
|
||||
|> Expect.equal Default.deviceName
|
||||
|
@ -41,7 +41,7 @@ suite =
|
|||
, fuzz Fuzz.string
|
||||
"syncTime"
|
||||
(\s ->
|
||||
{ content = s, serverName = "" }
|
||||
{ content = s, serverName = "", user = Nothing }
|
||||
|> Envelope.init
|
||||
|> Envelope.extractSettings .syncTime
|
||||
|> Expect.equal Default.syncTime
|
||||
|
|
|
@ -7,12 +7,11 @@ import Internal.Values.Vault exposing (Vault)
|
|||
import Test exposing (..)
|
||||
import Test.Tools.Hashdict as TestHashdict
|
||||
import Test.Values.Room as TestRoom
|
||||
import Test.Values.User as TestUser
|
||||
|
||||
|
||||
vault : Fuzzer Vault
|
||||
vault =
|
||||
Fuzz.map4 Vault
|
||||
Fuzz.map3 Vault
|
||||
(Fuzz.string
|
||||
|> Fuzz.map (\k -> ( k, Json.encode Json.int 0 ))
|
||||
|> Fuzz.list
|
||||
|
@ -20,4 +19,3 @@ vault =
|
|||
)
|
||||
(Fuzz.maybe Fuzz.string)
|
||||
(TestHashdict.fuzzer .roomId TestRoom.fuzzer)
|
||||
(Fuzz.maybe TestUser.fuzzer)
|
||||
|
|
Loading…
Reference in New Issue