Skip to content

Commit 29ac1aa

Browse files
committed
Refactor update tests in CQL::ActiveRecord for improved clarity
- Adjusted test assertions for unchanged attributes to enhance readability by aligning comments. - Removed unnecessary variable assignments in update! method tests for cleaner code structure.
1 parent 3b4a18e commit 29ac1aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/operations/active_record/updateable_spec.cr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ describe CQL::ActiveRecord::Updateable do
205205
updated_user = TestUser.find!(id)
206206
updated_user.name.should eq("Jane Doe")
207207
updated_user.email.should eq("john@example.com") # Should remain unchanged
208-
updated_user.age.should eq(25) # Should remain unchanged
208+
updated_user.age.should eq(25) # Should remain unchanged
209209
end
210210
end
211211
end
@@ -398,7 +398,7 @@ describe CQL::ActiveRecord::Updateable do
398398
updated_user = TestUser.find!(id)
399399
updated_user.name.should eq("Jane Doe")
400400
updated_user.email.should eq("john@example.com") # Should remain unchanged
401-
updated_user.age.should eq(25) # Should remain unchanged
401+
updated_user.age.should eq(25) # Should remain unchanged
402402
end
403403
end
404404

@@ -431,7 +431,7 @@ describe CQL::ActiveRecord::Updateable do
431431
user = TestUser.new("John Doe", "john@example.com", 25, "password123", "password123")
432432
user.save!
433433

434-
result = user.update!(name: "Jane Doe", age: 30)
434+
user.update!(name: "Jane Doe", age: 30)
435435

436436
# Local instance should be updated
437437
user.name.should eq("Jane Doe")
@@ -473,7 +473,7 @@ describe CQL::ActiveRecord::Updateable do
473473
user = TestUser.new("John Doe", "john@example.com", 25, "password123", "password123")
474474
user.save!
475475

476-
result = user.update!({:name => "Jane Doe", :age => 30})
476+
user.update!({:name => "Jane Doe", :age => 30})
477477

478478
# Local instance should be updated
479479
user.name.should eq("Jane Doe")

0 commit comments

Comments
 (0)