Sha256: e88310cbd4e8b851c4071ad49bd3c9db0320e9126363a80a39cd0e8ad7901fbf
Contents?: true
Size: 1.39 KB
Versions: 1
Compression:
Stored size: 1.39 KB
Contents
require 'spec_helper' describe ItemsController do describe "#new" do it "should be successful" do get :new response.should be_success end end describe "#create" do it "should be successful" do post :create, :item => { resource_type: 'ETD', administrative_collection_id: '123' } assigns[:item].should_not be_new_object response.should redirect_to upload_item_path(assigns[:item]) end end describe "#upload" do let (:item) { Item.create } it "should be successful" do get :upload, id: item assigns[:item].should == item response.should be_success end end describe "#edit" do let (:item) { Item.create } it "should be successful" do get :edit, id: item assigns[:item].should == item response.should be_success end end describe "#update" do let (:item) { Item.create } it "should be successful" do put :update, id: item, :item => { creator: ['Mark'], subject: ['Jumping Horses'] } assigns[:item].creator.should == ["Mark"] assigns[:item].subject.should == ["Jumping Horses"] response.should redirect_to submit_item_path(assigns[:item]) end end describe "#submit" do let (:item) { Item.create } it "should be successful" do get :submit, id: item assigns[:item].should == item response.should be_successful end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hydra_mediated-0.0.1 | spec/controllers/items_controller_spec.rb |