Files
old-holivud2/spec/controllers/public/casting_calls_controller_spec.rb
2020-07-16 17:38:21 +02:00

29 lines
996 B
Ruby

require 'rails_helper'
RSpec.describe Public::CastingCallsController, type: :controller do
render_views
describe "#show" do
let(:casting_call) { create(:casting_call) }
it "responds successfully" do
get :show, params: { token: casting_call.token }
expect(response).to be_successful
expect(assigns(:casting_call)).to eq(casting_call)
end
it "shows casting call details" do
get :show, params: { token: casting_call.token }
expect(response.body).to have_content(casting_call.title)
expect(response.body).to have_content(casting_call.description)
expect(response.body).to have_content(casting_call.project_description)
expect(response.body).to have_content(casting_call.interview_instructions)
expect(response.body).to have_content(casting_call.interview_requirements)
expect(response.body).to have_content(casting_call.questions)
expect(response.body).to have_link("Schedule an Audition")
end
end
end