Upstream sync
This commit is contained in:
@@ -20,6 +20,7 @@ RSpec.describe VideosController, type: :controller do
|
||||
end
|
||||
|
||||
it "has a search form" do
|
||||
create(:video, project: project)
|
||||
get :index, params: { project_id: project }
|
||||
|
||||
expect(response.body).to have_button("search-button")
|
||||
@@ -43,7 +44,7 @@ RSpec.describe VideosController, type: :controller do
|
||||
end
|
||||
|
||||
|
||||
it "renders content" do
|
||||
it "renders content if there are existing videos" do
|
||||
video = create(:video, project: project, name: "My Video", number: "001", created_at: 1.day.ago)
|
||||
|
||||
get :index, params: { project_id: project }
|
||||
@@ -58,10 +59,11 @@ RSpec.describe VideosController, type: :controller do
|
||||
end
|
||||
|
||||
context "when there are no records" do
|
||||
it "renders an empty message" do
|
||||
it "renders splash screen" do
|
||||
get :index, params: { project_id: project }
|
||||
|
||||
expect(response.body).to have_content("Videos will appear here")
|
||||
expect(response.body).to have_link "Upload New Video"
|
||||
expect(response.body).to have_link schedule_demo
|
||||
end
|
||||
end
|
||||
|
||||
@@ -277,4 +279,8 @@ RSpec.describe VideosController, type: :controller do
|
||||
def video_update_params
|
||||
attributes_for(:video, :with_graphics_only_edl_file, :with_audio_only_edl_file, name: "Test Video").except(:file)
|
||||
end
|
||||
|
||||
def schedule_demo
|
||||
t 'videos.splash.actions.book_demo'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user