Sha256: a850a0d7cea7553bd275fc29e5208a6f30ce5bee44a2fc76d3c179df5353e22a

Contents?: true

Size: 1.08 KB

Versions: 48

Compression:

Stored size: 1.08 KB

Contents

require 'rails_helper'

RSpec.describe '/de/backend/cms/content_boxes', type: :feature do
  let(:resource_class) { Cmor::Cms::ContentBox }
  let(:resource) { create(:cmor_cms_content_box) }
  let(:resources) { create_list(:cmor_cms_content_box, 3) }

  it { resources; expect(subject).to implement_index_action(self) }
  
  it {
    expect(subject).to implement_create_action(self)
      .for(Cmor::Cms::ContentBox)
      .within_form('#new_content_box') {
        fill_in 'content_box[name]', with: 'My first content box'
      }
      .increasing{ |resource| resource.count }.by(1)
  }

  it { expect(subject).to implement_show_action(self).for(resource) }
  
  it {
    expect(subject).to implement_update_action(self)
      .for(resource)
      .within_form('.edit_content_box') {
        fill_in 'content_box[name]', with: 'This is a fancy new Name'
      }
      .updating
      .from(resource.attributes)
      .to({ 'name' => 'This is a fancy new Name' })
  }
  
  it { 
    expect(subject).to implement_delete_action(self)
      .for(resource)
      .reducing{ resource_class.count }.by(1)
  }
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
cmor_cms_backend-0.0.53.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.52.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.51.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.50.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.49.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.48.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.45.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.44.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.43.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.42.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.41.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.40.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.39.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.38.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.37.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.36.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.35.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.34.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.33.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb
cmor_cms_backend-0.0.32.pre spec/features/de/backend/cms/content_boxes_feature_spec.rb