git.iko.soy/typeable/http-api-data
on master help sign in
Replace some deprecated functions in test
5f9b8e7Michael Snoyman
test/main.hs+20−20
@@ -23,48 +23,48 @@ main = hspecX specs
23specs :: Specs
23specs :: Specs
24specs = do
24specs = do
25 describe "PathPiece" $ do
25 describe "PathPiece" $ do
26− prop "toPathPiece <=> fromSinglePiece String" $ \(p::String) ->
26+ prop "toPathPiece <=> fromPathPiece String" $ \(p::String) ->
27− case (fromPathPiece . toSinglePiece) p of
27+ case (fromPathPiece . toPathPiece) p of
28 Nothing -> null p
28 Nothing -> null p
29 Just pConverted -> p == pConverted
29 Just pConverted -> p == pConverted
30
30
31− prop "toPathPiece <=> fromSinglePiece String" $ \(p::T.Text) ->
31+ prop "toPathPiece <=> fromPathPiece String" $ \(p::T.Text) ->
32− case (fromPathPiece . toSinglePiece) p of
32+ case (fromPathPiece . toPathPiece) p of
33 Nothing -> T.null p
33 Nothing -> T.null p
34 Just pConverted -> p == pConverted
34 Just pConverted -> p == pConverted
35
35
36− prop "toPathPiece <=> fromSinglePiece String" $ \(p::Int) ->
36+ prop "toPathPiece <=> fromPathPiece String" $ \(p::Int) ->
37− case (fromPathPiece . toSinglePiece) p of
37+ case (fromPathPiece . toPathPiece) p of
38 Nothing -> p < 0
38 Nothing -> p < 0
39 Just pConverted -> p == pConverted
39 Just pConverted -> p == pConverted
40
40
41 describe "PathMultiPiece" $ do
41 describe "PathMultiPiece" $ do
42− prop "toPathMultiPiece <=> fromMultiPiece String" $ \(p::[String]) ->
42+ prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[String]) ->
43− p == (fromJust . fromPathMultiPiece . toMultiPiece) p
43+ p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
44
44
45− prop "toPathMultiPiece <=> fromMultiPiece String" $ \(p::[T.Text]) ->
45+ prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[T.Text]) ->
46− p == (fromJust . fromPathMultiPiece . toMultiPiece) p
46+ p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
47
47
48
48
49 describe "SinglePiece" $ do
49 describe "SinglePiece" $ do
50− prop "toSinglePiece <=> fromSinglePiece String" $ \(p::String) ->
50+ prop "toPathPiece <=> fromPathPiece String" $ \(p::String) ->
51− case (fromSinglePiece . toSinglePiece) p of
51+ case (fromPathPiece . toPathPiece) p of
52 Nothing -> null p
52 Nothing -> null p
53 Just pConverted -> p == pConverted
53 Just pConverted -> p == pConverted
54
54
55− prop "toSinglePiece <=> fromSinglePiece String" $ \(p::T.Text) ->
55+ prop "toPathPiece <=> fromPathPiece String" $ \(p::T.Text) ->
56− case (fromSinglePiece . toSinglePiece) p of
56+ case (fromPathPiece . toPathPiece) p of
57 Nothing -> T.null p
57 Nothing -> T.null p
58 Just pConverted -> p == pConverted
58 Just pConverted -> p == pConverted
59
59
60− prop "toSinglePiece <=> fromSinglePiece String" $ \(p::Int) ->
60+ prop "toPathPiece <=> fromPathPiece String" $ \(p::Int) ->
61− case (fromSinglePiece . toSinglePiece) p of
61+ case (fromPathPiece . toPathPiece) p of
62 Nothing -> p < 0
62 Nothing -> p < 0
63 Just pConverted -> p == pConverted
63 Just pConverted -> p == pConverted
64
64
65 describe "MultiPiece" $ do
65 describe "MultiPiece" $ do
66− prop "toMultiPiece <=> fromMultiPiece String" $ \(p::[String]) ->
66+ prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[String]) ->
67− p == (fromJust . fromMultiPiece . toMultiPiece) p
67+ p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p
68
68
69− prop "toMultiPiece <=> fromMultiPiece String" $ \(p::[T.Text]) ->
69+ prop "toPathMultiPiece <=> fromPathMultiPiece String" $ \(p::[T.Text]) ->
70− p == (fromJust . fromMultiPiece . toMultiPiece) p
70+ p == (fromJust . fromPathMultiPiece . toPathMultiPiece) p