Skip to content

Commit

Permalink
Switched to web-view 0.6.0: Mod c instead of Mod
Browse files Browse the repository at this point in the history
  • Loading branch information
seanhess committed Dec 17, 2024
1 parent e5f8d90 commit 27bcc58
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tests: True
packages:
.
../web-view/
-- ../web-view/
-- https://hackage.haskell.org/package/web-view-0.6.0/candidate/web-view-0.6.0.tar.gz
4 changes: 2 additions & 2 deletions hyperbole.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ library
, wai >=3.2 && <4
, wai-websockets >=3.0 && <4
, warp >=3.3 && <4
, web-view >=0.4 && <=0.6
, web-view >=0.6 && <=1.0
, websockets >=0.12 && <0.14
default-language: GHC2021

Expand Down Expand Up @@ -131,6 +131,6 @@ test-suite test
, wai >=3.2 && <4
, wai-websockets >=3.0 && <4
, warp >=3.3 && <4
, web-view >=0.4 && <=0.6
, web-view >=0.6 && <=1.0
, websockets >=0.12 && <0.14
default-language: GHC2021
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies:
- http-types >= 0.12 && <0.13
- wai >= 3.2 && <4
- warp >= 3.3 && <4
- web-view >= 0.4 && <=0.6
- web-view >= 0.6 && <= 1.0
- string-conversions >= 0.4 && <0.5
- wai-websockets >= 3.0 && <4
- network >= 3.1 && <4
Expand Down
10 changes: 5 additions & 5 deletions test/Test/ViewIdSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,25 @@ spec = do

describe "Param Attributes" $ do
it "should serialize basic id" $ do
let atts = mempty :: Attributes
let atts = mempty :: Attributes id
(setId "woot" atts).other `shouldBe` [("id", "woot")]

it "should serialize compound id" $ do
let atts = mempty :: Attributes
let atts = mempty :: Attributes id
(setId (toViewId $ Two Thing) atts).other `shouldBe` [("id", pack $ show $ Two Thing)]

it "should serialize stringy id" $ do
let atts = mempty :: Attributes
let atts = mempty :: Attributes id
(setId (toViewId $ HasString "woot") atts).other `shouldBe` [("id", pack $ show $ HasString "woot")]

it "should serialize with Id" $ do
let atts = mempty :: Attributes
let atts = mempty :: Attributes id
(setId (toViewId $ WithId (Id "woot")) atts).other `shouldBe` [("id", "WithId \"woot\"")]


containsSingleQuotes :: Text -> Bool
containsSingleQuotes = T.elem '\''


setId :: Text -> Mod
setId :: Text -> Mod id
setId = att "id"

0 comments on commit 27bcc58

Please sign in to comment.