[tests-only] skip search by last month test (#7631)

* skip search by last month test

* use first day of the previous month
This commit is contained in:
Sawjan Gurung
2023-10-31 17:34:32 +05:45
committed by GitHub
parent 7dc7558684
commit e931597cc7
2 changed files with 6 additions and 4 deletions

View File

@@ -37,9 +37,11 @@ Feature: date search
| pattern | search-result-1 | search-result-2 | search-result-3 | search-result-4 |
| Mtime:today | /today.txt | | /yesterday.txt | /lastWeek.txt |
| Mtime:yesterday | /yesterday.txt | | /today.txt | |
| Mtime:"this week" | /today.txt | | /lastWeek.txt | /lastMont.txt |
| Mtime:"this month" | /today.txt | | /lastMont.txt | |
| Mtime:"last month" | /lastMonth.txt | | /today.txt | |
| Mtime:"this week" | /today.txt | | /lastWeek.txt | /lastMonth.txt |
| Mtime:"this month" | /today.txt | | /lastMonth.txt | |
# Issue: https://github.com/owncloud/ocis/issues/7629
# uncomment when issue is fixed
# | Mtime:"last month" | /lastMonth.txt | | /today.txt | |
| Mtime:"this year" | /today.txt | | /lastYear.txt | |
| Mtime:"last year" | /lastYear.txt | | /today.txt | |
| Mtime>=$today | /today.txt | | /yesterday.txt | |

View File

@@ -204,7 +204,7 @@ class SpacesTUSContext implements Context {
$mtime = date('Y-m-d', strtotime('-7 days'));
break;
case "lastMonth":
$mtime = date('Y-m' . '-01', strtotime('-1 month'));
$mtime = date('Y-m-d', strtotime('first day of previous month'));
break;
case "lastYear":
$mtime = date('Y-m' . '-01', strtotime('-1 year'));