Sha256: 4631c427294f4e2620c353b71d47de5151c289a0253986ee68990addf6b8ebc8
Contents?: true
Size: 765 Bytes
Versions: 4
Compression:
Stored size: 765 Bytes
Contents
require 'spec_helper' describe Spotlight::AttachmentsController, :type => :controller do routes { Spotlight::Engine.routes } let(:exhibit) { FactoryGirl.create(:exhibit) } describe "when not logged in" do describe "GET edit" do it "should be successful" do post :create, exhibit_id: exhibit expect(response).to redirect_to main_app.new_user_session_path end end end describe "when signed in as a curator" do let(:user) { FactoryGirl.create(:exhibit_curator, exhibit: exhibit) } before {sign_in user } describe "POST create" do it "should be successful" do post :create, exhibit_id: exhibit, attachment: { name: "xyz" } expect(response).to be_successful end end end end
Version data entries
4 entries across 4 versions & 1 rubygems