test/administrator_test.rb in createsend-5.0.0 vs test/administrator_test.rb in createsend-5.1.0

- old
+ new

@@ -6,11 +6,11 @@ @admin = CreateSend::Administrator.new @auth, "admin@example.com" end should "get a administrator by email address" do email = "admin@example.com" - stub_get(@auth, "admins.json?email=#{CGI.escape(email)}", "admin_details.json") + stub_get(@auth, "admins.json?email=#{ERB::Util.url_encode(email)}", "admin_details.json") admin = CreateSend::Administrator.get @auth, email admin.EmailAddress.should == email admin.Name.should == "Admin One" admin.Status.should == "Active" end @@ -22,16 +22,16 @@ end should "update an administrator" do email = "admin@example.com" new_email = "new_email_address@example.com" - stub_put(@auth, "admins.json?email=#{CGI.escape(email)}", nil) + stub_put(@auth, "admins.json?email=#{ERB::Util.url_encode(email)}", nil) @admin.update new_email, "Admin Name" @admin.email_address.should == new_email end should "delete an admin" do - stub_delete(@auth, "admins.json?email=#{CGI.escape(@admin.email_address)}", nil) + stub_delete(@auth, "admins.json?email=#{ERB::Util.url_encode(@admin.email_address)}", nil) @admin.delete end end end \ No newline at end of file