aboutsummaryrefslogtreecommitdiff
path: root/tests/test_atom.nim
diff options
context:
space:
mode:
authorJohn Conway <john.a.conway@gmail.com>2019-05-08 15:57:35 +0100
committerJohn Conway <john.a.conway@gmail.com>2019-05-08 15:57:35 +0100
commit01d296acb19c2f00d1868c2c74c2a3fd3a80fb53 (patch)
tree5b5727c8cda49d9375b543f444c7290fbaf589bb /tests/test_atom.nim
parent1aed195f821ed1f087ff46e00e6b3b4320e0bdb9 (diff)
downloadfeed-nim-01d296acb19c2f00d1868c2c74c2a3fd3a80fb53.tar.gz
feed-nim-01d296acb19c2f00d1868c2c74c2a3fd3a80fb53.zip
[Atom] Writing tests, fixing bugs
Diffstat (limited to 'tests/test_atom.nim')
-rw-r--r--tests/test_atom.nim15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/test_atom.nim b/tests/test_atom.nim
index 3d563da..c4c65f9 100644
--- a/tests/test_atom.nim
+++ b/tests/test_atom.nim
@@ -5,12 +5,19 @@
#
# To run these tests, simply execute `nimble test`.
+import unittest
+import marshal
+import feednim
+test "Read Valid Atom Feed":
+ let feed = "./tests/test_atom.xml".loadAtom()
-import unittest
+ echo $$feed
-import FeedNim
-test "can add":
- check add(5, 5) == 10
+ check feed.title != ""
+ check feed.generator != ""
+ check feed.authors[0].name == "Joe Bloggs"
+ check feed.authors[0].uri == "http://joe.bloggs"
+ check feed.authors[0].email == "mail@joe.bloggs" \ No newline at end of file