mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Tests: dummy names instead of a real one
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6e871e9ebb
commit
d5d06d4169
6 files changed
+11
-11
No files matched your search
@@ -2,7 +2,7 @@ require "test_helper"
|
||||
|
||||
class AirTrailExportFlowTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@pilot = create_user("ricky@example.com")
|
||||
@pilot = create_user("jane@example.com")
|
||||
@a = create_aircraft(pilot: @pilot, owner: create_user, tail_number: "N12345")
|
||||
@a.flight_logs.create!(date: Date.current, departure_location: "KOQU", destination_location: "KBID", tach_time: 0.5)
|
||||
sign_in @pilot
|
||||
@@ -13,10 +13,10 @@ class AirTrailExportFlowTest < ActionDispatch::IntegrationTest
|
||||
assert_select "a[href='#{new_aircraft_air_trail_export_path(@a)}']", text: "Export for AirTrail"
|
||||
get new_aircraft_air_trail_export_path(@a)
|
||||
assert_response :success
|
||||
assert_select "input[name='username'][value='ricky']"
|
||||
assert_select "input[name='username'][value='jane']"
|
||||
assert_select "form[data-turbo='false']"
|
||||
|
||||
post aircraft_air_trail_export_path(@a), params: { username: "ricky", aircraft_type: "C150", scope: "all" }
|
||||
post aircraft_air_trail_export_path(@a), params: { username: "jane", aircraft_type: "C150", scope: "all" }
|
||||
assert_response :success
|
||||
assert_equal "application/json", response.media_type
|
||||
assert_match(/attachment; filename="n12345-airtrail-.*\.json"/, response.headers["Content-Disposition"])
|
||||
|
||||
Reference in new issue
Block a user