diff --git a/app/controllers/videos_controller.rb b/app/controllers/videos_controller.rb index 822aead1..a0da916f 100644 --- a/app/controllers/videos_controller.rb +++ b/app/controllers/videos_controller.rb @@ -25,7 +25,7 @@ def show def find_by_id @video = Video.find_by!(youtube_id: params[:id]) - redirect_to playlist_video_path(@video, playlist_id: @video.playlist) + redirect_to playlist_video_path(@video, playlist_id: @video.playlist, ref: 'shortlink') end def early diff --git a/spec/features/videos/video_find_by_id_spec.rb b/spec/features/videos/video_find_by_id_spec.rb index 03bd89da..ef71fe1c 100644 --- a/spec/features/videos/video_find_by_id_spec.rb +++ b/spec/features/videos/video_find_by_id_spec.rb @@ -9,7 +9,7 @@ describe 'when the correct video is found' do it 'redirects to the correct video page' do visit "/v/#{video.youtube_id}" - expect(page).to have_current_path playlist_video_path(video, playlist_id: playlist) + expect(page).to have_current_path playlist_video_path(video, playlist_id: playlist, ref: 'shortlink') end end