Sha256: c5aae324af25593d9b01546c089141f9c5d48fddf9ca6372c619e60146f3a264
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
require 'spec_helper' RSpec.describe IshLibManager::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 |