Andy Allan
1096bccf98
Use user factories for some changeset_controller tests.
...
Others are tightly interwoven with the fixtures and will be tackled seperately.
2017-03-15 15:41:42 +00:00
Tom Hughes
8ccd7364cd
Merge remote-tracking branch 'openstreetmap/pull/1488'
2017-03-15 14:22:59 +00:00
Andy Allan
8d2d6e1a52
Use a pending user for testing password resets.
2017-03-15 14:22:04 +00:00
Andy Allan
3d8dc64b9c
Use users factory for user_controller tests.
2017-03-15 11:56:36 +00:00
Tom Hughes
7c9229fbfc
Throw an exception if adding a note comment fails
2017-03-13 14:49:16 +00:00
Andy Allan
17ff182c96
Build pending users via factory
2017-03-13 10:20:06 +00:00
Simon Poole
9606e440bc
Return maximum size of bounding box for note retrieval
2017-03-13 08:53:49 +01:00
Tom Hughes
685df702ef
Merge remote-tracking branch 'openstreetmap/pull/1483'
2017-03-09 18:35:57 +00:00
Tom Hughes
da57077c0b
Improve trace#api_data tests
...
The api_data action doesn't actually take the username as an
arguement and should be modelled on api_read rather than the
actions that handle web views.
2017-03-09 18:28:46 +00:00
Andy Allan
56e979c353
Remove redundant tests for deleted traces, and rearrange comments and factory calls for consistency.
2017-03-09 17:21:46 +00:00
Andy Allan
eac26c9a2c
Create a super_user factory.
2017-03-09 16:21:51 +00:00
Andy Allan
18c25b620b
Create a fresh user when requesting non-existent traces.
2017-03-09 14:50:02 +00:00
Andy Allan
2b06961ce3
Use user factory for trace_controller tests
2017-03-09 10:13:18 +00:00
Tom Hughes
d86380e7b5
Fix accidental change in comments
2017-03-06 18:01:26 +00:00
Andy Allan
d007956865
Use user factory for swf_controller tests.
2017-03-06 17:28:06 +00:00
Andy Allan
1d9e12b330
Use user factory for message_controller tests.
2017-03-06 17:25:55 +00:00
Andy Allan
f1397f4700
Use user factory for user_roles_controller tests.
2017-03-06 16:55:05 +00:00
Andy Allan
4bcd13a024
Use users factory for user_preferences_controller tests.
2017-03-05 16:47:40 +00:00
Andy Allan
02f7fb96e5
Use users factory for user_blocks_controller tests.
2017-03-05 16:34:59 +00:00
Andy Allan
912da4fc1e
Use users factory for redactions_controller tests.
2017-03-05 16:34:36 +00:00
Han Chao
49a7921ec8
Use local api to export map.osm
...
Closes #1282
2017-03-05 10:37:25 +00:00
Andy Allan
6335891a4c
User factories for browse, oauth_clients and site controller tests.
2017-02-23 14:13:09 +00:00
Andy Allan
a3618d2b5f
User factory associations for all factories.
2017-02-22 18:51:45 +00:00
Tom Hughes
1a5161a9c8
Remove a few unnecessary attributes from moderator users
2017-02-22 18:30:47 +00:00
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
Tom Hughes
bbd24879fd
Merge remote-tracking branch 'openstreetmap/pull/1458'
2017-02-22 17:55:37 +00:00
Tom Hughes
df24950854
Merge remote-tracking branch 'openstreetmap/pull/1457'
2017-02-22 12:28:13 +00:00
Andy Allan
f4835594b6
Convert notes_controller tests to user factories.
2017-02-22 11:33:50 +00:00
Andy Allan
c84a371d97
Revert changes where the user is a query parameter
2017-02-22 11:07:43 +00:00
Andy Allan
8bd98b5da8
Refactor api_controller tests to avoid users fixtures.
2017-02-22 11:03:39 +00:00
Andy Allan
38a3e4ba2b
Refactor amf_controller tests to avoid users fixtures
...
In all honesty I wouldn't be surprised if there are some semi-hidden
dependencies on the user fixtures here, given the number of magic numbers
all over the place. But this commit takes care of the explicit
dependencies for now.
2017-02-22 10:30:53 +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
e23541c20f
Allow a POST with no arguments to trace#edit to fetch the form
2017-02-13 10:09:43 +00:00
Tom Hughes
92fe7a8506
Only create diary entries for POST requests
2017-02-09 21:07:18 +00:00
Tom Hughes
349862f1b7
Test that GET on message#new can't send a message
2017-02-09 20:39:03 +00:00
Tom Hughes
f435fce007
Link GPX fixture files instead of stubbing
2017-02-05 17:26:31 +00:00
Tom Hughes
71c2fc671f
Cleanup double comment markers
2017-02-05 17:25:54 +00:00
Tom Hughes
0814b4096c
Merge remote-tracking branch 'openstreetmap/pull/1347' into master
2017-02-05 16:02:20 +00:00
Andy Allan
8a6e8ae128
Convert client applications fixtures into a factory
...
Closes #1415
2017-01-26 18:03:51 +00:00
Tom Hughes
69b967c9ff
Add support for Wikimedia authentication
...
Closes #1146
2016-12-20 22:32:25 +00:00
Tom Hughes
970e1a99d7
Merge remote-tracking branch 'openstreetmap/pull/1367'
2016-12-18 16:29:33 +00:00
Tom Hughes
34c473f503
Use only_path instead of setting an explicit host
2016-11-24 20:33:36 +00:00
Andy Allan
898c1475ba
Add tags to features before propogating them.
2016-11-17 11:08:36 +00:00
Andy Allan
2f9ed9101a
Fix spelling of propagate.
2016-11-17 10:49:52 +00:00
Andy Allan
62346c7e88
Be explicit in which traces are expected.
...
I think this is an improvement compared to running db queries to
fetch the expected results.
2016-11-17 10:26:54 +00:00
Andy Allan
717f4e1b7b
Create object for list tests, and assert the responses have the
...
required number of results.
Previously, the tests would pass regardless of whether anything was
in the database.
2016-11-16 20:08:16 +00:00
Andy Allan
a66f0f32e9
Rename test trace fixtures to use letters instead of numbers.
...
This prevents them from being deleted by mistake, if trace.delete is
called on a factory-generated trace with a coincidental id.
2016-11-16 17:45:26 +00:00
Tom Hughes
b8c80bae2d
Stub nominatim for reverse lookups in note tests
2016-11-09 22:07:42 +00:00
Tom Hughes
a73ac770fb
Stub nominatim for reverse lookups in diary tests
2016-11-09 21:54:26 +00:00