- assert_nothing_raised(OSM::APIBadXMLError) {
- Changeset.from_xml(xml, false)
- }
- assert_nothing_raised(OSM::APIBadXMLError) {
- Changeset.from_xml(xml, true)
- }
+ assert_nothing_raised do
+ Changeset.from_xml(xml, :create => false)
+ end
+ assert_nothing_raised do
+ Changeset.from_xml(xml, :create => true)
+ end
+ end
+
+ def test_subscription
+ changeset = create(:changeset)
+ user = create(:user)
+
+ assert_not changeset.subscribed?(user)
+
+ changeset.subscribe(user)
+ assert changeset.subscribed?(user)
+
+ changeset.unsubscribe(changeset.subscribers.first)
+ assert_not changeset.subscribed?(user)