mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
test:add mock JSON resource files for campaigns API responses
This commit is contained in:
parent
714e5f8a4b
commit
cc0fb9f632
2 changed files with 31 additions and 0 deletions
7
app/src/test/resources/raw/campaigns_response_empty.json
Normal file
7
app/src/test/resources/raw/campaigns_response_empty.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"showOnlyLiveCampaigns": false,
|
||||||
|
"sortBy": "startDate"
|
||||||
|
},
|
||||||
|
"campaigns": []
|
||||||
|
}
|
||||||
24
app/src/test/resources/raw/campaigns_response_with_data.json
Normal file
24
app/src/test/resources/raw/campaigns_response_with_data.json
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"showOnlyLiveCampaigns": false,
|
||||||
|
"sortBy": "startDate"
|
||||||
|
},
|
||||||
|
"campaigns": [
|
||||||
|
{
|
||||||
|
"title": "Wiki Loves Monuments",
|
||||||
|
"description": "A campaign to photograph monuments",
|
||||||
|
"startDate": "2025-09-01",
|
||||||
|
"endDate": "2025-09-30",
|
||||||
|
"link": "https://commons.wikimedia.org/wiki/Campaign:Wiki_Loves_Monuments",
|
||||||
|
"isWLMCampaign": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Wiki Loves Nature",
|
||||||
|
"description": "A campaign to photograph nature",
|
||||||
|
"startDate": "2025-06-01",
|
||||||
|
"endDate": "2025-06-30",
|
||||||
|
"link": "https://commons.wikimedia.org/wiki/Campaign:Wiki_Loves_Nature",
|
||||||
|
"isWLMCampaign": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue