docbrown/spec/support
Daniel Uber 195b202d85
Use normal db transactions around tests (#13035)
* Use normal db transactions around tests

An unrelated spec failure was observed when this was run before
another test expecting the seed data to be present. It looks like the
specific pain point in https://github.com/forem/forem/pull/8865 was
around an rss reader spec (which is no longer in use) and I'd like to
try reverting this truncation behavior here.

The minimal failing test case I had on master was this

```
 rspec ./spec/system/dashboards/user_sorts_dashboard_articles_spec.rb:44  ./spec/lib/data_update_scripts/fix_profile_field_edge_cases_spec.rb
```

The find_by(attribute:...) in the edge case spec returned nil (since
there was no such profile field, the table had been truncated). Tests
pass locally so this might be fine to just leave on the defaults (if
that's the case the truncation support added in #8865 can also be
removed, this is the last caller).

* Reenable transactional feeds imports

rhymes pointed out that a second test uses this db_strategy and that's
the successor to the rss_feed_spec.rb that was the initial issue.

Attempt removal of the truncation strategy, and reenable the
transactional tests, for the feeds import.

* Remove database cleaner

Having removed the last use of it (in the feeds import spec) we no
longer need this gem.

* remove spec support for database cleaner
2021-03-18 12:56:55 -05:00
..
fixtures Save Data Update Script errors to database and show them on http://localhost:3000/admin/data_update_scripts (#12348) 2021-01-21 14:48:34 +01:00
initializers Fix RSpec unit testing when using Docker dev setup (#10950) 2020-10-20 10:36:41 -04:00
seeds improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
api_analytics_shared_examples.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
elasticsearch_helpers.rb Flaky Spec Fixes: Dont Assume No Elasticsearch Data, Refresh before delete_by_query (#8354) 2020-06-09 07:55:28 -05:00
omniauth_helpers.rb Add Sign in with Apple (#11934) 2020-12-18 10:22:33 -06:00
runkit_tag_context.rb Fix Runkit tags not being activated when comment is added (#6767) 2020-05-15 14:27:46 +02:00
shared_context.rb [15-minute fix] Add ThrottledCall to DisplayAdEventsController (#12924) 2021-03-09 09:06:11 +07:00
sidekiq_test_helpers.rb Add implicit points to follows to improve feed relevancy (in all algorithms) (#11513) 2020-11-25 16:09:51 -05:00
within_block_is_expected.rb Improve ArticlesController's authorization (#466) 2018-06-21 14:18:32 -04:00