File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ ## 2025-11-20
4+
5+ ### 2025-11-20 14:30:00 - [ ADD] tests for phone validation activate/deactivate methods
6+
7+ - Added test_06_activate_phone_validation to verify state changes from inactive to active
8+ - Added test_07_deactivate_phone_validation to verify state changes from active to inactive
9+ - Completes test coverage for phone validation state management methods
Original file line number Diff line number Diff line change @@ -101,3 +101,33 @@ def test_05_create_phone_with_invalid_special_characters(self):
101101 self .phone_model .create (phone_vals )
102102
103103 self .assertIn ("Phone number contains invalid special characters" , str (cm .exception ))
104+
105+ def test_06_activate_phone_validation (self ):
106+ """Test activating a phone validation record"""
107+ phone_validation = self .phone_validation_model .create (
108+ {
109+ "number_of_digits" : 9 ,
110+ "with_prefix" : False ,
111+ "state" : "inactive" ,
112+ }
113+ )
114+ self .assertEqual (phone_validation .state , "inactive" )
115+
116+ phone_validation .activate_phone_validation ()
117+ self .assertEqual (phone_validation .state , "active" , "Phone validation state should be 'active' after activation" )
118+
119+ def test_07_deactivate_phone_validation (self ):
120+ """Test deactivating a phone validation record"""
121+ phone_validation = self .phone_validation_model .create (
122+ {
123+ "number_of_digits" : 8 ,
124+ "with_prefix" : False ,
125+ "state" : "active" ,
126+ }
127+ )
128+ self .assertEqual (phone_validation .state , "active" )
129+
130+ phone_validation .deactivate_phone_validation ()
131+ self .assertEqual (
132+ phone_validation .state , "inactive" , "Phone validation state should be 'inactive' after deactivation"
133+ )
You can’t perform that action at this time.
0 commit comments