Refactored to rename "service terms" to "terms of service" (#9581)
* #124 renamed identififers from service terms to terms of service * #124 renamed identififers from service terms to terms of service * 124 renamed ServiceTerms model to TermsOfService * 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService * 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService * #124 fixed formatting * #124 fixed formatting * #132 renamed table ServiceTerms to TermsOfService * #124 renamed some missed files from 'service_terms' to 'terms_of_service' * #124 removed fixed TODOs * drop migrate of ServiceTerms table, since backporting * s/ServiceTerms/TermsOfService/ in tests * s/AcceptedServiceTermsId/AcceptedTermsOfServiceId/ Change the model attribute, even though the column name will eventually be removed. * s/accepted_service_terms_id/accepted_terms_of_service_id/ to match redux * s/serviceTerms/termsOfService * rename column too, and add max size constraint * s/EnableCustomServiceTerms/EnableCustomTermsOfService
Этот коммит содержится в:
коммит произвёл
Jesse Hallam
родитель
59319b7915
Коммит
bffcccf99d
@@ -3069,20 +3069,20 @@ func TestGetUsersByStatus(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestRegisterServiceTermsAction(t *testing.T) {
|
||||
func TestRegisterTermsOfServiceAction(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
defer th.TearDown()
|
||||
Client := th.Client
|
||||
|
||||
success, resp := Client.RegisterServiceTermsAction(th.BasicUser.Id, "st_1", true)
|
||||
CheckErrorMessage(t, resp, "store.sql_service_terms_store.get.no_rows.app_error")
|
||||
success, resp := Client.RegisteTermsOfServiceAction(th.BasicUser.Id, "st_1", true)
|
||||
CheckErrorMessage(t, resp, "store.sql_terms_of_service_store.get.no_rows.app_error")
|
||||
|
||||
serviceTerms, err := th.App.CreateServiceTerms("service terms", th.BasicUser.Id)
|
||||
termsOfService, err := th.App.CreateTermsOfService("terms of service", th.BasicUser.Id)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
success, resp = Client.RegisterServiceTermsAction(th.BasicUser.Id, serviceTerms.Id, true)
|
||||
success, resp = Client.RegisteTermsOfServiceAction(th.BasicUser.Id, termsOfService.Id, true)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
assert.True(t, *success)
|
||||
@@ -3091,5 +3091,5 @@ func TestRegisterServiceTermsAction(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
assert.Equal(t, user.AcceptedServiceTermsId, serviceTerms.Id)
|
||||
assert.Equal(t, user.AcceptedTermsOfServiceId, termsOfService.Id)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user