Skip to content
Snippets Groups Projects
Commit 8adebe7a authored by azul's avatar azul
Browse files

test: use advanced fixtures

Also added an extension to ActiveRecord::FixtureSet
that will add timestamps to autogenerated join records.

https://github.com/rails/rails/pull/21337 inspired this.
Our own implementation differs significantly though.

:sphinx: turn access_ids index into bigints
these are also integers with number prefixes.
Pitty that this will increase the index size considerably

Add council fixture

test: ensure that group wiki creation is forbidden for non council members
add fixtures for a groupwithcouncil
add a test for wiki editing without council powers
remove versioning test

test: do not delete pages from sphinx index

Remove a test that would delete a task list page from the fixtures.
Transactional fixtures restore the page but the entry in the sphinx
index is not restored.
This lead to inconsistencies between sphinx and sql.

I'm not sure how to properly fix this. Here's a few ideas:

1) reindex sphinx before or after test runs.
  Sphinx claims to take 0.005 seconds to index the few pages we have in
  the fixtures

2) create the page that we want to delete in the test itself

3) reindex sphinx between runs of different suites
  The page is deleted in a pages:unit test.
  The failing tests are part of the core tests.

3) seems like a bad idea as it only works if page and core tests
are run separately.
2) seems cumbersome. Plus we should be able to delete fixtures without
  thinking about such things.
1) seems preferable.

test: fix brittle tests

* Make sure animals are in the right order to pick Iguana from the top of
the page.

* Use a Wiki page to test the comments inclusion in page_terms.
  Discussion Page will store them as body_content rather than comments.
parent b9c7999d
No related branches found
No related tags found
No related merge requests found
Showing
with 238 additions and 442 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment