• Markus Koller's avatar
    Refactor feature spec for group wikis · f2606b96
    Markus Koller authored
    This extracts the feature specs for project wikis into shared examples,
    and reuses them for group wikis.
    
    Most of the specs were ported directly with some small adjustments to
    make the wiki container generic:
    
    - Using the `wiki_path` / `wiki_page_path` route helpers.
    - Using `wiki.container` instead of `project`.
    
    Some specs needed special treatment:
    
    - `user_views_wiki_empty_spec` tests the different conditions for the
      empty state message, which on projects can also link to the issues
      tracker. This was refactored into a shared example that can test
      the various conditions dynamically.
    
    - `user_creates_wiki_page_spec` and `user_updates_wiki_page_spec` were
      repeating some tests for project wikis in group and user namespaces.
      This duplication was removed, since these go through the same code
      paths and don't apply to group wikis.
    
    - `user_creates_wiki_page_spec` also contained tests for the wiki
      sidebar, these were extracted into their own shared examples.
    
    - Diffing wiki pages doesn't work yet with group wikis, so those tests
      are temporarily skipped.
    f2606b96
user_views_wiki_empty_spec.rb 2.25 KB