Sha256: cd5f4ae974d512ee2c7d1ae2251c3c0ff2ba9a1875943844b4a83dfd5508e1ba
Contents?: true
Size: 807 Bytes
Versions: 9
Compression:
Stored size: 807 Bytes
Contents
require 'spec_helper' RSpec.configure do |c| Warden.test_mode! end describe "datastreams/upload.html.erb" do let(:object) { FactoryGirl.create(:item) } let(:user) { FactoryGirl.create(:user) } before { object.permissions = [{type: 'user', name: user.email, access: 'edit'}] object.save login_as(user, :scope => :user, :run_callbacks => false) visit fcrepo_admin.upload_object_datastream_path(object, "descMetadata") } after do user.delete object.delete Warden.test_reset! end it "should provide an upload form" do attach_file "file", File.join(Rails.root, "spec", "fixtures", "files", "descMetadata.xml") click_button I18n.t("fcrepo_admin.datastream.upload.form.submit") object.reload object.title.should == "Altered Test Component" end end
Version data entries
9 entries across 9 versions & 1 rubygems