minio-hs/test/Network/Minio/XmlGenerator/Test.hs
Aditya Manthramurthy aabcf3dfec Restructure tests
2017-02-13 16:03:42 +05:30

25 lines
743 B
Haskell

module Network.Minio.XmlGenerator.Test
( xmlGeneratorTests
) where
import Test.Tasty
import Test.Tasty.HUnit
import Lib.Prelude
import Network.Minio.XmlGenerator
xmlGeneratorTests :: TestTree
xmlGeneratorTests = testGroup "XML Generator Tests"
[ testCase "Test mkCreateBucketConfig" testMkCreateBucketConfig
]
euBucketConfig :: ByteString
euBucketConfig = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><CreateBucketConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\
\<LocationConstraint>EU</LocationConstraint>\
\</CreateBucketConfiguration>"
testMkCreateBucketConfig :: Assertion
testMkCreateBucketConfig = do
assertEqual "CreateBucketConfiguration xml should match: " euBucketConfig $ mkCreateBucketConfig "EU"