Tests: dummy names instead of a real one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-11 20:52:52 -05:00
1 parent 6e871e9ebb
commit d5d06d4169
6 files changed
+11 -11

No files matched your search

+3 -3
View File
@@ -11,13 +11,13 @@ class AirTrailExportTest < ActiveSupport::TestCase
tach_time: tach, hobbs_time: hobbs, user: user, notes: notes)
end
def export(**opts) = AirTrailExport.new(@a, username: "ricky", **opts)
def export(**opts) = AirTrailExport.new(@a, username: "jane", **opts)
test "builds AirTrail's import format" do
fly Date.new(2026, 10, 24), "KLHV", "44N", tach: 1.9, hobbs: 2.0, notes: "Fall colors"
data = JSON.parse(export(aircraft_type: "c150").to_json)
assert_equal [ { "id" => "sam-pilot", "username" => "ricky", "displayName" => "ricky" } ], data["users"]
assert_equal [ { "id" => "sam-pilot", "username" => "jane", "displayName" => "jane" } ], data["users"]
f = data["flights"].first
assert_equal "2026-10-24", f["date"]
assert_equal "day", f["datePrecision"]
@@ -83,6 +83,6 @@ class AirTrailExportTest < ActiveSupport::TestCase
assert_not AirTrailExport.new(@a, username: "ri").valid?
assert_not AirTrailExport.new(@a, username: "jane pilot").valid?
assert_not export(aircraft_type: "CESSNA").valid?
assert_not AirTrailExport.new(create_aircraft, username: "ricky").valid? # no flights
assert_not AirTrailExport.new(create_aircraft, username: "jane").valid? # no flights
end
end