registering_resources.feature 934 B

123456789101112131415161718192021222324252627282930313233
  1. Feature: Registering Resources
  2. Registering resources within Active Admin
  3. Background:
  4. Given I am logged in
  5. And a post with the title "Hello World" exists
  6. Scenario: Registering a resource with the defaults
  7. Given a configuration of:
  8. """
  9. ActiveAdmin.register Post
  10. """
  11. When I go to the dashboard
  12. Then I should see "Posts"
  13. When I follow "Posts"
  14. Then I should see "Hello World"
  15. When I follow "View"
  16. Then I should see "Hello World"
  17. And I should be in the resource section for Post
  18. Scenario: Registering a resource with another name
  19. Given a configuration of:
  20. """
  21. ActiveAdmin.register Post, :as => "My Post"
  22. """
  23. When I go to the dashboard
  24. Then I should see "My Posts"
  25. When I follow "My Posts"
  26. Then I should see "Hello World"
  27. When I follow "View"
  28. Then I should see "Hello World"
  29. And I should be in the resource section for My Post