Sha256: 476715d807f0a94dbf0a7e3cbb81e0a29251e35baa2c633e46a8b23aa0869bc5

Contents?: true

Size: 700 Bytes

Versions: 13

Compression:

Stored size: 700 Bytes

Contents

# Generated via
#  `rails generate curation_concerns:work <%= class_name %>`
require 'rails_helper'
include Warden::Test::Helpers

RSpec.feature 'Create a <%= class_name %>' 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
      login_as user
    end

    scenario do
      visit new_curation_concerns_<%= file_name %>_path
      fill_in 'Title', with: 'Test <%= class_name %>'
      click_button 'Create <%= class_name %>'
      expect(page).to have_content 'Test <%= class_name %>'
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.7 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-2.0.0 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-2.0.0.rc2 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.6 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.5 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.4 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.3 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.2 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-2.0.0.rc1 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.1 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.0 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb
curation_concerns-1.7.0.beta1 lib/generators/curation_concerns/work/templates/feature_spec.rb.erb