Sha256: 4249c2e6dfcc30252787c72c7fd25feeea14a13d0ee4b673e25e22d989abcc73
Contents?: true
Size: 915 Bytes
Versions: 8
Compression:
Stored size: 915 Bytes
Contents
# Generated via # `rails generate hyrax:work <%= class_name %>` require 'rails_helper' include Warden::Test::Helpers # NOTE: If you generated more than one work, you have to set "js: true" RSpec.feature 'Create a <%= class_name %>', js: false do context 'a logged in user' do let(:user_attributes) do { <%= Devise.authentication_keys.first %>: 'test@example.com' } end let(:user) do User.new(user_attributes) { |u| u.save(validate: false) } end before do AdminSet.find_or_create_default_admin_set_id login_as user end scenario do visit '/dashboard' click_link "Works" click_link "Add new work" # If you generate more than one work uncomment these lines # choose "payload_concern", option: "<%= class_name %>" # click_button "Create work" expect(page).to have_content "Add New <%= human_name %>" end end end
Version data entries
8 entries across 8 versions & 1 rubygems