Rubocop fixes
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 13 Mar 2019 11:06:19 +0000 (12:06 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 16 Mar 2019 15:30:41 +0000 (15:30 +0000)
test/controllers/api/changesets_controller_test.rb

index b62235a..730c3cb 100644 (file)
@@ -1674,7 +1674,7 @@ CHANGESET
       changeset = create(:changeset, :user => user)
 
       ## First try with a non-public user
       changeset = create(:changeset, :user => user)
 
       ## First try with a non-public user
-      new_changeset = create_changeset_xml(user: private_user)
+      new_changeset = create_changeset_xml(:user => private_user)
       new_tag = XML::Node.new "tag"
       new_tag["k"] = "tagtesting"
       new_tag["v"] = "valuetesting"
       new_tag = XML::Node.new "tag"
       new_tag["k"] = "tagtesting"
       new_tag["v"] = "valuetesting"
@@ -1695,7 +1695,7 @@ CHANGESET
       assert_require_public_data "user with their data non-public, shouldn't be able to edit their changeset"
 
       ## Now try with the public user
       assert_require_public_data "user with their data non-public, shouldn't be able to edit their changeset"
 
       ## Now try with the public user
-      new_changeset = create_changeset_xml(id: 1)
+      new_changeset = create_changeset_xml(:id => 1)
       new_tag = XML::Node.new "tag"
       new_tag["k"] = "tagtesting"
       new_tag["v"] = "valuetesting"
       new_tag = XML::Node.new "tag"
       new_tag["k"] = "tagtesting"
       new_tag["v"] = "valuetesting"
@@ -1728,7 +1728,7 @@ CHANGESET
       basic_authorization create(:user).email, "test"
 
       changeset = create(:changeset)
       basic_authorization create(:user).email, "test"
 
       changeset = create(:changeset)
-      new_changeset = create_changeset_xml(user: changeset.user, id: changeset.id)
+      new_changeset = create_changeset_xml(:user => changeset.user, :id => changeset.id)
       new_tag = XML::Node.new "tag"
       new_tag["k"] = "testing"
       new_tag["v"] = "testing"
       new_tag = XML::Node.new "tag"
       new_tag["k"] = "testing"
       new_tag["v"] = "testing"
@@ -1969,9 +1969,7 @@ CHANGESET
         cs["user"] = user.display_name
         cs["uid"] = user.id.to_s
       end
         cs["user"] = user.display_name
         cs["uid"] = user.id.to_s
       end
-      if id
-        cs["id"] = id.to_s
-      end
+      cs["id"] = id.to_s if id
       root.root << cs
       root
     end
       root.root << cs
       root
     end