Sha256: 7cffa8fa60f8d2dd259e143f824bbccf2ca56dc3e0840012e4dce7e7ac3a9ede

Contents?: true

Size: 1.97 KB

Versions: 72

Compression:

Stored size: 1.97 KB

Contents

Feature: STI Resource

  Ensure that standard CRUD works with STI models

  Background:
    Given I am logged in
    And a configuration of:
    """
      ActiveAdmin.register Publisher
      ActiveAdmin.register User
    """

  Scenario: Create, update and delete a child STI resource
    Given I am on the index page for publishers
    When I follow "New Publisher"
    And I fill in "First name" with "Terry"
    And I fill in "Last name" with "Fox"
    And I fill in "Username" with "terry_fox"
    And I press "Create Publisher"
    Then I should see "Publisher was successfully created"
    And I should see "Terry"

    When I follow "Edit Publisher"
    And I fill in "First name" with "Joe"
    And I press "Update Publisher"
    Then I should see "Publisher was successfully updated"
    And I should see "Joe"

    When I follow "Delete Publisher"
    Then I should see "Publisher was successfully destroyed"

  Scenario: Create, update and delete a parent STI resource
    Given I am on the index page for users
    When I follow "New User"
    And I fill in "First name" with "Terry"
    And I fill in "Last name" with "Fox"
    And I fill in "Username" with "terry_fox"
    And I press "Create User"
    Then I should see "User was successfully created"
    And I should see "Terry"

    When I follow "Edit User"
    And I fill in "First name" with "Joe"
    And I press "Update User"
    Then I should see "User was successfully updated"
    And I should see "Joe"

    When I follow "Delete User"
    Then I should see "User was successfully destroyed"

  Scenario: Update and delete a child STI when the parent is registered
    Given a publisher named "Terry Fox" exists
    And I am on the index page for users
    When I follow "Edit"
    And I fill in "First name" with "Joe"
    And I press "Update Publisher"
    Then I should see "Publisher was successfully updated"
    And I should see "Joe"

    When I follow "Delete User"
    Then I should see "Publisher was successfully destroyed"

Version data entries

72 entries across 72 versions & 4 rubygems

Version Path
activeadmin-0.6.6 features/sti_resource.feature
activeadmin-0.6.5 features/sti_resource.feature
activeadmin-0.6.4 features/sti_resource.feature
activeadmin-0.6.3 features/sti_resource.feature
activeadmin-0.6.2 features/sti_resource.feature
activeadmin-0.6.1 features/sti_resource.feature
lalala-4.0.0.dev.141 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.136 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.135 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.134 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.133 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.132 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.131 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.129 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.128 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.126 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.125 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.124 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.123 vendor/deps/active_admin/features/sti_resource.feature
lalala-4.0.0.dev.118 vendor/deps/active_admin/features/sti_resource.feature