@@ -88,7 +88,8 @@ public function test_bulk_edit_assets_accepts_all_possible_attributes()
8888 'order_number ' => '123456 ' ,
8989 'warranty_months ' => 24 ,
9090 'next_audit_date ' => '2024-06-01 ' ,
91- 'requestable ' => false
91+ 'requestable ' => false ,
92+ 'notes ' => 'This is a new note! ' ,
9293 ]);
9394
9495 // gets the ids together to submit to the endpoint
@@ -108,7 +109,8 @@ public function test_bulk_edit_assets_accepts_all_possible_attributes()
108109 'order_number ' => '7890 ' ,
109110 'warranty_months ' => 36 ,
110111 'next_audit_date ' => '2025-01-01 ' ,
111- 'requestable ' => true
112+ 'requestable ' => true ,
113+ 'notes ' => 'This is a newer note! ' ,
112114 ])
113115 ->assertStatus (302 )
114116 ->assertSessionHasNoErrors ();
@@ -128,6 +130,7 @@ public function test_bulk_edit_assets_accepts_all_possible_attributes()
128130 $ this ->assertEquals ('2025-01-01 ' , $ asset ->next_audit_date );
129131 // shouldn't requestable be cast as a boolean??? it's not.
130132 $ this ->assertEquals (1 , $ asset ->requestable );
133+ $ this ->assertEquals ('This is a newer note! ' , $ asset ->notes );
131134 });
132135 }
133136
@@ -156,7 +159,8 @@ public function test_bulk_edit_assets_nulls_out_fields_if_selected()
156159 'order_number ' => '123456 ' ,
157160 'warranty_months ' => 24 ,
158161 'next_audit_date ' => '2024-06-01 ' ,
159- 'requestable ' => false
162+ 'requestable ' => false ,
163+ 'notes ' => 'This is a note that will be deleted ' ,
160164 ]);
161165
162166 // gets the ids together to submit to the endpoint
@@ -169,6 +173,7 @@ public function test_bulk_edit_assets_nulls_out_fields_if_selected()
169173 'null_purchase_date ' => '1 ' ,
170174 'null_expected_checkin_date ' => '1 ' ,
171175 'null_next_audit_date ' => '1 ' ,
176+ 'null_notes ' => '1 ' ,
172177 'status_id ' => $ status2 ->id ,
173178 'model_id ' => $ model2 ->id ,
174179 ])
@@ -181,6 +186,7 @@ public function test_bulk_edit_assets_nulls_out_fields_if_selected()
181186 $ this ->assertNull ($ asset ->purchase_date );
182187 $ this ->assertNull ($ asset ->expected_checkin );
183188 $ this ->assertNull ($ asset ->next_audit_date );
189+ $ this ->assertNull ($ asset ->notes );
184190 });
185191 }
186192
0 commit comments