Created
July 28, 2014 20:14
-
-
Save doug7410/eadb5f6a27ed8bd5dcc3 to your computer and use it in GitHub Desktop.
video_controller_spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe VideosController do | |
describe "GET show" do | |
it "sets the requested video to @video" do | |
video = Video.create(title: "Game of Thrones", description: "A very awesome show!") | |
get :show, id: video.id | |
assigns(:video) == video | |
end | |
it "renders the show template" do | |
user = User.create(email: "[email protected]", password: "abc123", full_name: "doug s") | |
session[:user_id] = user.id | |
video = Video.create(title: "Game of Thrones", description: "A very awesome show!") | |
get :show, id: video.id | |
expect(response).to render_template :show | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment