Cucumber test for data_version value
This commit is contained in:
parent
475d8b4d84
commit
828cac32aa
@ -75,6 +75,10 @@ module.exports = function () {
|
||||
got.message = json.message || '';
|
||||
}
|
||||
|
||||
if (headers.has('data_version')) {
|
||||
got.data_version = json.data_version || '';
|
||||
}
|
||||
|
||||
if (headers.has('#')) {
|
||||
// comment column
|
||||
got['#'] = row['#'];
|
||||
|
||||
@ -17,9 +17,26 @@ Feature: Basic Routing
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| b | a | ab,ab |
|
||||
| from | to | route | data_version |
|
||||
| a | b | ab,ab | |
|
||||
| b | a | ab,ab | |
|
||||
|
||||
Scenario: Data_version test
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
|
||||
And the extract extra arguments "--data_version cucumber_data_version"
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | data_version |
|
||||
| a | b | ab,ab | cucumber_data_version |
|
||||
| b | a | ab,ab | cucumber_data_version |
|
||||
|
||||
Scenario: Routing in between two nodes of way
|
||||
Given the node map
|
||||
|
||||
@ -71,7 +71,7 @@ class RouteAPI : public BaseAPI
|
||||
auto data_timestamp = facade.GetTimestamp();
|
||||
if (!data_timestamp.empty())
|
||||
{
|
||||
response.values["data_version"] = facade.GetTimestamp();
|
||||
response.values["data_version"] = data_timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user