Sha256: b8d8ec3317139c3627426e04360504d060abc884d239c364c1e5e51d17055f56
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
require 'spec_helper' RSpec.describe Manager::CitiesController, :type => :controller do render_views before :each do setup_users sign_in :user, @manager setup_sites Report.all.each { |c| c.remove } @r1 = FactoryGirl.create :r1 @r1.user = @user @r1.save @r9 = FactoryGirl.create :r9 Report.all.each do |report| report.site = @site report.save end Gallery.unscoped.each do |gallery| gallery.remove end @gallery = Gallery.create :name => 'some-gallery-name', :user => @manager, :site => @site flag = @gallery.save puts! @gallery.errors unless flag flag.should eql true Tag.all.each { |c| c.remove } City.all.each { |c| c.remove } @city = FactoryGirl.create :rio n = Newsitem.new :descr => 'first newsitem' @city.newsitems << n Gallery.all.each { |g| g.remove } @g = Gallery.create :name => 'a', :galleryname => 'bb', :user => User.all[0] end it 'index' do get :index response.should be_success assigns( :cities ).should_not eql nil end describe 'new' do it 'should GET new' do get :new, :locale => :en response.should be_success end end it 'create' do ; end describe 'show' do it 'should have n_reports, n_galleries' do get :show, :id => @city.id response.should be_success response.should render_template('manager/cities/show') 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/cities_controller_spec.rb~ |