Browse Source

add empire to coarse reverse controller

pull/1002/head
Stephen Hess 7 years ago
parent
commit
2df5d6d23b
  1. 1
      controller/coarse_reverse.js
  2. 41
      test/unit/controller/coarse_reverse.js

1
controller/coarse_reverse.js

@ -16,6 +16,7 @@ const coarse_granularities = [
'macroregion', 'macroregion',
'dependency', 'dependency',
'country', 'country',
'empire',
'continent', 'continent',
'ocean', 'ocean',
'marinearea' 'marinearea'

41
test/unit/controller/coarse_reverse.js

@ -211,17 +211,21 @@ module.exports.tests.success_conditions = (test, common) => {
{ id: 100, name: 'country name', abbr: 'xyz'}, { id: 100, name: 'country name', abbr: 'xyz'},
{ id: 101, name: 'country name 2'} { id: 101, name: 'country name 2'}
], ],
empire: [
{ id: 110, name: 'empire name', abbr: 'empire abbr'},
{ id: 111, name: 'empire name 2'}
],
continent: [ continent: [
{ id: 110, name: 'continent name', abbr: 'continent abbr'}, { id: 120, name: 'continent name', abbr: 'continent abbr'},
{ id: 111, name: 'continent name 2'} { id: 121, name: 'continent name 2'}
], ],
ocean: [ ocean: [
{ id: 120, name: 'ocean name', abbr: 'ocean abbr'}, { id: 130, name: 'ocean name', abbr: 'ocean abbr'},
{ id: 121, name: 'ocean name 2'} { id: 131, name: 'ocean name 2'}
], ],
marinearea: [ marinearea: [
{ id: 130, name: 'marinearea name', abbr: 'marinearea abbr'}, { id: 140, name: 'marinearea name', abbr: 'marinearea abbr'},
{ id: 131, name: 'marinearea name 2'} { id: 141, name: 'marinearea name 2'}
] ]
}; };
@ -295,14 +299,17 @@ module.exports.tests.success_conditions = (test, common) => {
country: ['country name'], country: ['country name'],
country_id: ['100'], country_id: ['100'],
country_a: ['xyz'], country_a: ['xyz'],
empire: ['empire name'],
empire_id: ['110'],
empire_a: ['empire abbr'],
continent: ['continent name'], continent: ['continent name'],
continent_id: ['110'], continent_id: ['120'],
continent_a: ['continent abbr'], continent_a: ['continent abbr'],
ocean: ['ocean name'], ocean: ['ocean name'],
ocean_id: ['120'], ocean_id: ['130'],
ocean_a: ['ocean abbr'], ocean_a: ['ocean abbr'],
marinearea: ['marinearea name'], marinearea: ['marinearea name'],
marinearea_id: ['130'], marinearea_id: ['140'],
marinearea_a: ['marinearea abbr'], marinearea_a: ['marinearea abbr'],
}, },
center_point: { center_point: {
@ -844,17 +851,21 @@ module.exports.tests.failure_conditions = (test, common) => {
{ id: 100, name: 'country name', abbr: 'xyz'}, { id: 100, name: 'country name', abbr: 'xyz'},
{ id: 101, name: 'country name 2'} { id: 101, name: 'country name 2'}
], ],
empire: [
{ id: 110, name: 'empire name', abbr: 'empire abbr'},
{ id: 111, name: 'empire name 2'}
],
continent: [ continent: [
{ id: 110, name: 'continent name', abbr: 'continent abbr'}, { id: 120, name: 'continent name', abbr: 'continent abbr'},
{ id: 111, name: 'continent name 2'} { id: 121, name: 'continent name 2'}
], ],
ocean: [ ocean: [
{ id: 120, name: 'ocean name', abbr: 'ocean abbr'}, { id: 130, name: 'ocean name', abbr: 'ocean abbr'},
{ id: 121, name: 'ocean name 2'} { id: 131, name: 'ocean name 2'}
], ],
marinearea: [ marinearea: [
{ id: 130, name: 'marinearea name', abbr: 'marinearea abbr'}, { id: 140, name: 'marinearea name', abbr: 'marinearea abbr'},
{ id: 131, name: 'marinearea name 2'} { id: 141, name: 'marinearea name 2'}
] ]
}; };

Loading…
Cancel
Save