mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-28 22:52:47 +00:00
Additional v2 regression test
This commit is contained in:
parent
e2af3cf510
commit
0e910d733d
|
@ -394,3 +394,20 @@ func (suite *FiltersTestSuite) TestPutFilterUnsetExpirationDateNullJSON() {
|
||||||
filter = suite.setFilterExpiration(id, nil, nil, &requestJson)
|
filter = suite.setFilterExpiration(id, nil, nil, &requestJson)
|
||||||
suite.Nil(filter.ExpiresAt)
|
suite.Nil(filter.ExpiresAt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Regression test related to https://github.com/superseriousbusiness/gotosocial/issues/3497
|
||||||
|
func (suite *FiltersTestSuite) TestPutFilterUnalteredExpirationDateJSON() {
|
||||||
|
id := suite.testFilters["local_account_1_filter_4"].ID
|
||||||
|
|
||||||
|
// Setup: set an expiration date for the filter.
|
||||||
|
expiresIn := 86400
|
||||||
|
filter := suite.setFilterExpiration(id, &expiresIn, nil, nil)
|
||||||
|
if !suite.NotNil(filter.ExpiresAt) {
|
||||||
|
suite.FailNow("Test precondition failed")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update nothing. There should still be an expiration date.
|
||||||
|
requestJson := `{}`
|
||||||
|
filter = suite.setFilterExpiration(id, nil, nil, &requestJson)
|
||||||
|
suite.NotNil(filter.ExpiresAt)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue