diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-04-28 13:28:55 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-06-05 14:47:40 +0200 |
commit | 55d9a312fbba91f1bcf5e3f3291b7bece8abb178 (patch) | |
tree | bb9ef165b425273da47aa000268395f87f26678e /tests/test-xmlrpc.js | |
parent | 34bbe8e7306a0d0ec014db7512788ed92c625d19 (diff) | |
download | bugzilla-triage-55d9a312fbba91f1bcf5e3f3291b7bece8abb178.tar.gz |
Reformatting to MoFo coding style
Diffstat (limited to 'tests/test-xmlrpc.js')
-rw-r--r-- | tests/test-xmlrpc.js | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/tests/test-xmlrpc.js b/tests/test-xmlrpc.js index f3f2e56..78bf9d5 100644 --- a/tests/test-xmlrpc.js +++ b/tests/test-xmlrpc.js @@ -2,21 +2,21 @@ /*jslint plusplus: false */ "use strict"; var xrpc = require("xmlrpc"); -var xmlOut = "<?xml version=\"1.0\"?>\n" + - "<methodCall>\n<methodName>bugzilla.updateAttachMimeType</methodName>\n" + - "<params>\n<param>\n<value><struct>\n<member>\n<name>attach_id</name>\n" + - "<value><string>myId</string></value>\n</member>\n<member>\n" + - "<name>mime_type</name>\n<value><string>text/plain</string></value>\n</member>\n" + - "<member>\n<name>nomail</name>\n<value><string>billg@microsoft.com</string>" + - "</value>\n</member>\n</struct>\n</value>\n</param>\n<param>\n" + - "<value><string>me@example.com</string></value>\n</param>\n" + - "<param>\n<value><string>secret</string></value>\n</param>\n" + - "<param>\n<value><double>3.14</double></value>\n</param>\n" + - "<param>\n<value><boolean>1</boolean></value>\n</param>\n" + - "</params>\n</methodCall>"; +var xmlOut = "<?xml version=\"1.0\"?>\n" + + "<methodCall>\n<methodName>bugzilla.updateAttachMimeType</methodName>\n" + + "<params>\n<param>\n<value><struct>\n<member>\n<name>attach_id</name>\n" + + "<value><string>myId</string></value>\n</member>\n<member>\n" + + "<name>mime_type</name>\n<value><string>text/plain</string></value>\n</member>\n" + + "<member>\n<name>nomail</name>\n<value><string>billg@microsoft.com</string>" + + "</value>\n</member>\n</struct>\n</value>\n</param>\n<param>\n" + + "<value><string>me@example.com</string></value>\n</param>\n" + + "<param>\n<value><string>secret</string></value>\n</param>\n" + + "<param>\n<value><double>3.14</double></value>\n</param>\n" + + "<param>\n<value><boolean>1</boolean></value>\n</param>\n" + + "</params>\n</methodCall>"; -exports.ensureLeadingZero = function (test) { - test.assert(typeof(xrpc.leadingZero) == "function"); +exports.ensureLeadingZero = function(test) { + test.assert(typeof (xrpc.leadingZero) == "function"); test.assertEqual(xrpc.leadingZero("1"), "01"); test.assertEqual(xrpc.leadingZero(1), "01"); test.assertEqual(xrpc.leadingZero("11"), "11"); @@ -25,12 +25,13 @@ exports.ensureLeadingZero = function (test) { test.assertEqual(xrpc.leadingZero(111), "111"); test.assertEqual(xrpc.leadingZero("-1"), "-1"); test.assertEqual(xrpc.leadingZero(-1), "-1"); - test.assertEqual(xrpc.leadingZero("zzz"),"zzz"); + test.assertEqual(xrpc.leadingZero("zzz"), "zzz"); }; // testing xrpc.XMLRPCMessage -exports.ensureGenerateXMLRPC = function (test) { - var msg = new xrpc.XMLRPCMessage("bugzilla.updateAttachMimeType"); +exports.ensureGenerateXMLRPC = function(test) { + var msg = new xrpc.XMLRPCMessage( + "bugzilla.updateAttachMimeType"); msg.addParameter({ 'attach_id' : "myId", 'mime_type' : "text/plain", @@ -40,6 +41,6 @@ exports.ensureGenerateXMLRPC = function (test) { msg.addParameter("secret"); msg.addParameter(3.14); msg.addParameter(true); - test.assertEqual(msg.xml(), xmlOut, - "generate XML-RPC message"); + test + .assertEqual(msg.xml(), xmlOut, "generate XML-RPC message"); }; |