Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-07-06 11:57:10 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-07-17 15:44:37 -0400
commit160ab01f9a7b99dbea904b20c5711c358f190187 (patch)
tree2343021b6cababa3b338a8bdda94fc5f6e690f2b /test
parente25bec5ac06960c3f5ade5c1eaa8e47ec379e2ad (diff)
downloadliza-160ab01f9a7b99dbea904b20c5711c358f190187.tar.gz
liza-160ab01f9a7b99dbea904b20c5711c358f190187.tar.bz2
liza-160ab01f9a7b99dbea904b20c5711c358f190187.zip
DataApiMediator: setData{ByName=>} to prepare for multi-field set
See following commit. * src/client/dapi/DataApiMediator.js (_updateFieldData): `setData{ByName=>}'. * test/client/dapi/DataApiMediatorTest.js: Update respective tests. DEV-3257
Diffstat (limited to 'test')
-rw-r--r--test/client/dapi/DataApiMediatorTest.js21
1 files changed, 10 insertions, 11 deletions
diff --git a/test/client/dapi/DataApiMediatorTest.js b/test/client/dapi/DataApiMediatorTest.js
index 60e9c9d..8ad4d31 100644
--- a/test/client/dapi/DataApiMediatorTest.js
+++ b/test/client/dapi/DataApiMediatorTest.js
@@ -59,7 +59,7 @@ describe( "DataApiMediator", () =>
name: 'foo',
index: 0,
value: [ "first", "second" ],
- expected: [ "first" ],
+ expected: { foo: [ "first" ] },
val_label: [
{ value: "first result", label: "first" },
@@ -72,7 +72,7 @@ describe( "DataApiMediator", () =>
name: 'bar',
index: 1,
value: [ "first", "second" ],
- expected: [ , "second" ],
+ expected: { bar: [ , "second" ] },
val_label: [
{ value: "first result", label: "first" },
@@ -86,7 +86,7 @@ describe( "DataApiMediator", () =>
name: 'bar',
index: -1,
value: [ "first", "second" ],
- expected: [ "first", "second" ],
+ expected: { bar: [ "first", "second" ] },
val_label: [
{ value: "first result", label: "first" },
@@ -101,7 +101,7 @@ describe( "DataApiMediator", () =>
name: 'foo',
index: 0,
value: [ "does not", "exist" ],
- expected: [ "first result" ],
+ expected: { foo: [ "first result" ] },
val_label: [
{ value: "first result", label: "first" },
@@ -115,7 +115,7 @@ describe( "DataApiMediator", () =>
name: 'foo',
index: 1,
value: [ "does not", "exist" ],
- expected: [ , "first result" ],
+ expected: { foo: [ , "first result" ] },
val_label: [
{ value: "first result", label: "first" },
@@ -129,7 +129,7 @@ describe( "DataApiMediator", () =>
name: 'foo',
index: -1,
value: [ "does not", "exist" ],
- expected: [ "first result", "first result" ],
+ expected: { foo: [ "first result", "first result" ] },
val_label: [
{ value: "first result", label: "first" },
@@ -144,7 +144,7 @@ describe( "DataApiMediator", () =>
name: 'foo',
index: 0,
value: [ "foo" ],
- expected: [ "" ],
+ expected: { foo: [ "" ] },
val_label: [],
results: {},
@@ -154,7 +154,7 @@ describe( "DataApiMediator", () =>
name: 'foo',
index: 1,
value: [ "foo", "bar" ],
- expected: [ , "" ],
+ expected: { foo: [ , "" ] },
val_label: [],
results: {},
@@ -164,7 +164,7 @@ describe( "DataApiMediator", () =>
name: 'foo',
index: -1,
value: [ "foo", "bar" ],
- expected: [ "", "" ],
+ expected: { foo: [ "", "" ] },
val_label: [],
results: {},
@@ -182,9 +182,8 @@ describe( "DataApiMediator", () =>
return value;
},
- setDataByName( given_name, given_data )
+ setData( given_data )
{
- expect( given_name ).to.equal( name );
expect( given_data ).to.deep.equal( expected );
// should have called setOptions by now