Sha256: 96789a8289c432ff14f625450b23a3da8876c0795134cd37dd02402e2864a109
Contents?: true
Size: 713 Bytes
Versions: 8
Compression:
Stored size: 713 Bytes
Contents
require 'spec_helper' describe CatalogController, :type => :controller do before do allow(controller).to receive(:has_access?).and_return(true) @user = FactoryGirl.find_or_create(:user) @collection = Collection.new title: "Test" @collection.apply_depositor_metadata(@user.user_key) @collection.read_groups = ["public"] @collection.save! end after do @collection.destroy end routes { Rails.application.routes } describe '#index' do it 'should assign @user_collections' do get :index expect(assigns(:user_collections)).to be_kind_of(Array) expect(assigns(:user_collections).index{|d| d.id == @collection.id}).not_to be_nil end end end
Version data entries
8 entries across 8 versions & 1 rubygems