Sha256: eaeab24842d541adf3c3899e41f5d34e045fe6afdb26c2dd01166fb4e402637c
Contents?: true
Size: 1004 Bytes
Versions: 7
Compression:
Stored size: 1004 Bytes
Contents
require 'spec_helper' describe 'curation_concerns/base/_form.html.erb', type: :view do let(:ability) { double } let(:user) { stub_model(User) } let(:form) do CurationConcerns::GenericWorkForm.new(work, ability) end before do # view.lookup_context.view_paths.push 'app/views/curation_concerns' # allow(controller).to receive(:current_user).and_return(user) allow(view).to receive(:curation_concern).and_return(work) end let(:page) do view.simple_form_for form do |f| render 'curation_concerns/base/form', f: f end Capybara::Node::Simple.new(rendered) end context "when the work has been saved before" do before do allow(work).to receive(:new_record?).and_return(false) assign(:form, form) end let(:work) { stub_model(GenericWork, id: '456', etag: '123456') } it "renders the form with the version" do expect(page).to have_selector("input#generic_work_version[value=\"123456\"]", visible: false) end end end
Version data entries
7 entries across 7 versions & 1 rubygems