Sha256: fd5ea9332d48a7e005de480c7db5ae513af7c0940f294cd8faa3e57cd0518e55
Contents?: true
Size: 923 Bytes
Versions: 5
Compression:
Stored size: 923 Bytes
Contents
require 'rails_helper' describe HasVcards::VcardsController do routes { HasVcards::Engine.routes } before { @vcard = FactoryGirl.create :vcard } describe "GET 'show'" do it 'returns http success' do get :show, { id: @vcard.id } expect(response).to be_success end it 'renders the show template' do get :show, { id: @vcard.id } expect(response).to render_template('show') end it 'loads the specified record' do get :show, { id: @vcard.id } expect(assigns(:vcard)).to match(@vcard) end end describe "GET 'index'" do it 'returns http success' do get :index expect(response).to be_success end it 'renders the index template' do get :index expect(response).to render_template('index') end it 'loads all records' do get :index expect(assigns(:vcards)).to match_array([@vcard]) end end end
Version data entries
5 entries across 5 versions & 1 rubygems