Sha256: 45077856a6b94c1f1577e8729aed24b82627319154035d8360a2ec67162883af
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' RSpec.describe Manager::PhotosController, :type => :controller do render_views before :each do setup_users sign_in :user, @manager setup_sites @photo_without_gallery = Photo.new :user => @user @photo_without_gallery.save controller.request.stub referrer: 'http://example.com' end describe 'everything' do it 'photos without a gallery' do get :without_gallery response.should be_success response.should render_template('manager/photos/without_gallery') assigns( :photos ).should_not eql nil assigns( :photos ).length.should > 0 assigns( :photos ).each do |ph| ph.gallery.should eql nil end end it 'delete' do delete :destroy, :id => @photo_without_gallery.id result = Photo.unscoped.find @photo_without_gallery.id result.is_trash.should eql true end it 'show' do get :show, :id => @photo_without_gallery.id response.should be_success response.should render_template('manager/photos/show') assigns( :photo ).should_not eql nil end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ish_lib_manager-0.0.1 | test/dummy/spec/controllers/ish_lib_manager/photos_controller_spec.rb~ |