packages feed

atlassian-connect-descriptor 0.4.3.0 → 0.4.3.1

raw patch · 4 files changed

+12/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

atlassian-connect-descriptor.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.4.3.0+version:             0.4.3.1  -- A short (one-line) description of the package. synopsis:            Code that helps you create a valid Atlassian Connect Descriptor.
+ dist/build/test-descriptorStub/test-descriptorStub-tmp/test-descriptorStub.hs view
@@ -0,0 +1,5 @@+module Main ( main ) where+import Distribution.Simple.Test.LibV09 ( stubMain )+import Test ( tests )+main :: IO ()+main = stubMain tests
src/Data/Connect/Conditions.hs view
@@ -67,7 +67,10 @@       , "invert" .= conditionInverted sc       , "params" .= conditionParams sc       ]-   toJSON cc@(CompositeCondition {}) = object [ "conditions" .= subConditions cc, "type" .= conditionType cc]+   toJSON cc@(CompositeCondition {}) = object [ compositionConditionKey cc .= subConditions cc]++compositionConditionKey (CompositeCondition _ AndCondition) = "and"+compositionConditionKey (CompositeCondition _ OrCondition) = "or"  -- | Composite Conditions can be joined together to behave as a single condition. The way that you can join them together -- is decided by the condition type.
tests/ConditionsTest.hs view
@@ -91,12 +91,11 @@ -- CompositeCondition's are rendered correctly compositeAndConditionConnect :: Test compositeAndConditionConnect = TestCase $ do-    let condition = CompositeCondition threeChildConditions AndCondition+    let condition = CompositeCondition threeChildConditions OrCondition     let jsonValue = toJSON condition     isObject jsonValue @? "Expect the conditions in an object."-    conditions <- getArray =<< get "conditions" jsonValue+    conditions <- getArray =<< get "or" jsonValue     sequence (fmap (getString <=< get "condition") conditions) `isEqualTo` ["user_has_issue_history","is_watching_issue","has_voted_for_issue"]-    get "type" jsonValue `isEqualTo` "AND"  conditionParamsTest :: Test conditionParamsTest = TestCase $ do