Commit graph

32 commits

Author SHA1 Message Date
Andy Allan
91f3339b6a Make all factory-generated users 'normal'
The use of create(:normal_user) makes the tests needlessly harder to
understand and reason about, particularly when we start using
associations in the factories.
2017-02-22 18:26:03 +00:00
Andy Allan
7d9d496da2 Pass the user object, rather than the id, for sessions.
This simplifies the code slightly.
2017-02-22 09:57:18 +00:00
Andy Allan
737a325f2e Refactor diary entry tests to use User factory 2017-02-19 16:43:32 +00:00
Tom Hughes
92fe7a8506 Only create diary entries for POST requests 2017-02-09 21:07:18 +00:00
Tom Hughes
a73ac770fb Stub nominatim for reverse lookups in diary tests 2016-11-09 21:54:26 +00:00
Andy Allan
4a9aa0a12e Avoid double-escaping diary entry titles
The XML builder takes care of the escaping, and adding h() lead to
double-escaped titles in the RSS feed.
2016-10-29 17:17:56 +02:00
Andy Allan
c365e2b28a Convert the languages fixtures to a factory
For some tests, the existance of an 'en' language is assumed by
the database structure (not null default 'en'::character varying) so
this can be created in a setup block.
2016-10-26 13:14:52 +01:00
Andy Allan
feb3b03227 Use model relations when creating objects from factories
Rather than passing around record ids explicitly, we can use the
model relations and pass around the models. This makes reading the
tests slightly simpler to read.
2016-10-19 11:32:08 +01:00
Mikel Maron
be40536440 merge upstream/master and resolve conflicts from https://github.com/openstreetmap/openstreetmap-website/pull/1318 2016-10-12 10:52:05 -04:00
Mikel Maron
3726d561ea last minor fixes 2016-10-11 20:42:10 -04:00
Mikel Maron
6b7ebf6dc4 clean up comments 2016-10-07 09:04:44 -04:00
Mikel Maron
8272a53ab9 fix rubocop warnings 2016-10-07 06:36:14 -04:00
Mikel Maron
a32076abd6 fix rubocop warnings 2016-10-07 06:32:05 -04:00
Mikel Maron
e055eaf690 tests passing 2016-10-06 21:33:47 -04:00
Andy Allan
bfe760a4b0 Replace friends fixture with a factory 2016-10-05 13:18:45 +01:00
Mikel Maron
44b08cc35d not api endpoints, moved to button, fixed notifier message, fixed tests 2016-10-03 22:20:04 -04:00
Mikel Maron
443080d7b0 WIP diary comment subscriptions 2016-10-03 15:04:22 -04:00
Andy Allan
516979b045 Add additional list items to ensure they are not selected
The other list tests already have assetions showing the different
lengths of lists.
2016-09-15 11:06:37 +01:00
Andy Allan
f1713320c2 Remove diary_entry and diary_comment fixtures, and refactor tests.
Note that you might need to empty the tables in your local test
database, since the removed fixtures may still linger there.
2016-09-14 12:41:58 +01:00
Andy Allan
ea610c8c3c Refactor tests to use factories instead of fixtures 2016-09-08 11:44:24 +01:00
Tom Hughes
fe4d50588d Update test for changes in #903 2015-08-27 21:55:48 +01:00
Tom Hughes
93fb360a08 Add a few more tests 2015-03-07 00:50:35 +00:00
Tom Hughes
21d60e359a Tests! 2015-03-04 21:49:43 +00:00
Tom Hughes
305593a704 Load friends fixtures for diary entry tests 2015-03-02 21:46:04 +00:00
Tom Hughes
15b550182c Yet more tests... 2015-03-02 21:20:01 +00:00
Tom Hughes
fa5c39d9bd Load user_roles fixtures so we know who is an administrator 2015-02-22 19:44:31 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456 Cleanup trailing whitespace 2015-02-20 08:56:16 +00:00
Tom Hughes
a9a9ae2cbb Updated for changes in rails HTML testing 2015-01-11 12:53:06 +00:00
Tom Hughes
0ebbccdcef Fix invalid CSS selectors 2015-01-10 17:45:10 +00:00
Tom Hughes
98184dfb9c Reorganise tests to match modern rails test layout 2014-02-26 00:13:19 +00:00
Renamed from test/functional/diary_entry_controller_test.rb (Browse further)