Andy Allan
43066124bf
Remove unused countries fixture.
2016-10-19 11:47:22 +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
Andy Allan
23c3168c55
Replace user_blocks fixture with a factory.
...
Traits are used here to make the tests easier to read, and the
different traits can be combined where necessary.
2016-10-19 10:57:40 +01:00
Tom Hughes
e96f1e736a
Merge remote-tracking branch 'openstreetmap/pull/1309'
2016-10-12 19:11:07 +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
Andy Allan
a91e50d308
Replace changeset_comments fixtures with a factory.
...
There's little point in testing ChangesetComment.count so I've removed that
test.
2016-10-12 15:44:27 +01:00
Mikel Maron
3726d561ea
last minor fixes
2016-10-11 20:42:10 -04:00
Tom Hughes
c2e12ed77d
Add a note_with_comments factory
2016-10-10 15:08:11 +01:00
Tom Hughes
61eac42a82
Makr author/author_ip tests more consistent
2016-10-10 13:54:58 +01:00
Tom Hughes
3123822bba
Merge remote-tracking branch 'openstreetmap/pull/1312'
2016-10-10 13:48:09 +01: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
41c9bc2326
Remove the note and note_comments fixtures
...
You may need to run "DELETE FROM notes" and "DELETE FROM note_comments"
on your local test database.
2016-10-06 09:17:58 +01:00
Andy Allan
c302174b0c
Update notes_controller_test to use note and note_comment factories
...
I've ported across the naming for each note from the old fixture names.
This helps in the mega-tests where multiple notes are tested at the
same time.
The number or results have changed in some tests, since there's little
point in creating e.g. 5 note comments when 2 is enough to test the
functionality.
2016-10-06 09:15:47 +01:00
Andy Allan
886dc00ad4
Update site_controller_test to use note and note_comment factories.
2016-10-06 09:04:06 +01:00
Andy Allan
5037e016cd
Update browse_controller_test to use note and note_comment factories.
2016-10-06 09:03:31 +01:00
Andy Allan
e4d3c7fb8e
Update note model tests to use factories.
...
The NoteTest.test_visible? has changed slightly, so that the second
test of .visible? is using a closed note, which is a more useful test
than the original.
2016-10-06 08:56:45 +01:00
Andy Allan
2e1ccafdce
Add factories for notes and note_comments
2016-10-06 08:52:17 +01: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
Sarah Hoffmann
5efbc8a8b7
look for extra place tags in Nominatim search results
...
Administrative boundaries at municipality level are generally
better described by the place node (as town, village etc.).
Nominatim exports the place type in extratags if it was able
to merge place nodes with admin boundaries. Use this preferably
to create the descriptive term.
2016-09-26 13:00:10 +02:00
Tom Hughes
5f4dcd34ff
Fix some rubocop warnings
2016-09-15 22:41:07 +01: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
d26f4074fa
Remove unneccessary fixture requirement.
2016-09-14 16:23:47 +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
Andy Allan
4f5c8b7956
Change the display_name of suspended user fixuture
...
The original name is reserved, which means the user was invalid,
and this causes problems when building objects using it via
associations.
2016-09-08 11:40:03 +01:00
Andy Allan
04591aed9f
Test DiaryComment body validation
...
Replaces unnecessary test.
2016-09-08 10:01:11 +01:00
Andy Allan
191f6b3fcd
Build a diary entry more succinctly
2016-09-08 09:06:46 +01:00
Andy Allan
bb15077dcc
Assert there are no diary comments before creating one.
2016-09-08 09:06:26 +01:00
Andy Allan
ab12b6161a
Update name of test
2016-09-08 08:58:18 +01:00
Andy Allan
3b3f328ae4
Rework DiaryEntry and DiaryComment model tests to use factories.
...
Since the database also contains fixtures from other tests, some
counts are dropped and instead tested for inclusion in the results.
2016-09-07 16:27:21 +01:00
Andy Allan
d5013ad0d2
Add FactoryGirl
2016-09-07 15:28:28 +01:00
Simon Poole
0837205d02
Merge message when Gravatar status has changed with email confirmation
...
Merge message when Gravatar status has changed with email confirmation and make messages more verbose and friendly.
2016-08-19 08:59:40 +02:00
Simon Poole
90b7101cc3
Add tests for change of gravatar use depending on email
2016-08-16 22:09:11 +02:00
Simon Poole
8283a39dbc
Support returning a HTTP status code for the http stubs for testing
2016-08-16 21:42:02 +02:00
Simon Poole
05cd781b25
Remove default enabling of gravatar, check on initial confirmation of e-mail address and on any changes afterward if
...
a gravatar exists and enable then if the user hasn't uploaded a picture.
2016-08-16 21:42:02 +02:00
Tom Hughes
224252fd83
Add test for formatting of multi-value wikidata links
2016-08-16 19:27:40 +01:00
Florian Schäfer
3251cdf5d6
Added fixes for rubocop complaints
2016-07-14 15:22:52 +02:00
Florian M. Schäfer
10cde3bb92
Link the prefixed wikidata-tags to wikidata.org
...
With this commit, the prefixed wikidata-tags get linked to the
corresponding wikidata.org-page in the current interface-language.
Multiple semicolon-separated wikidata-IDs are shown as multiple
semicolon-separated links to wikidata.
This commit contains also some tests for those links.
2016-07-14 15:22:52 +02:00
Tom Hughes
c70a1fe933
Add support for GitHub authentication
2016-07-14 09:40:45 +01:00
Tom Hughes
dd8ebf9b09
Fix rubocop warnings
2016-07-13 09:50:23 +01:00
Tom Hughes
5fd4fd13c2
Update to rails 4.2.7
2016-07-13 09:14:01 +01:00
Tom Hughes
72e71b9972
Fix rubocop warnings
2016-06-09 22:18:28 +01:00
Tom Hughes
246d8a4452
Test titles in changeset feed
2016-03-14 21:18:26 +00:00
Simon Legner
6f144e8b7d
Show ref of object when no name is present
2016-03-09 18:47:54 +00:00
Tom Hughes
f94340b9e8
Fix tests that made assumptions about tag ordering
2016-03-09 13:47:05 +00:00