Skip to content

Commit

Permalink
Merge pull request #261 from art-institute-of-chicago/fix/more-tweaks…
Browse files Browse the repository at this point in the history
…-to-tours

Map Tour `tour_audio` to selection from CMS [MA-165]
  • Loading branch information
nikhiltri authored Feb 29, 2024
2 parents 7d76b93 + cb55d87 commit de4c88d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Models/Transformers/TourTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function transform(TwillModelContract $tour): array
'description' => $tour->description,
'intro' => $tour->intro,
'tour_duration' => $tour->duration_in_minutes,
'tour_audio' => $tour->selector?->locales,
'tour_audio' => $tour->selector?->apiAudios->first()?->datahub_id,
'category' => null, // Legacy from Drupal
'weight' => $tour->position,
];
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/FloorSerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function test_floor_plan_url(): void
$floor = Floor::factory()->withFloorPlan()->create();
$serializer = new FloorSerializer();
$serialized = $serializer->serialize([$floor]);
$floorPlanUrl = $serialized['map_floors']['map_floor' . $floor->level]['floor_plan'];
$floorPlanUrl = $serialized['map_floors']['map_floor' . ($floor->level == 'LL' ? '0' : $floor->level)]['floor_plan'];
$this->assertStringStartsWith('https://', $floorPlanUrl, 'The floor plan url uses the https scheme');
}
}

0 comments on commit de4c88d

Please sign in to comment.