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

Loading…
Cancel
Save