Commit graph

217 commits

Author SHA1 Message Date
Andy Allan
ea502ac9df Rubocop fix. 2016-10-29 17:32:50 +02:00
Andy Allan
15689af6bf Replace trace-related fixtures with factories.
The mocking and stubbing in the controller tests is
unfortunate, but the models interact directly with the filesystem
using the trace id so that's hard to control any other way.
2016-10-29 16:23:04 +02:00
Tom Hughes
2df3605142 Merge remote-tracking branch 'openstreetmap/pull/1339' 2016-10-26 15:54:42 +01:00
Tom Hughes
8920a56133 Merge remote-tracking branch 'openstreetmap/pull/1338' 2016-10-26 15:48:56 +01:00
Tom Hughes
3371ca37f1 Merge remote-tracking branch 'openstreetmap/pull/1337' 2016-10-26 15:41:30 +01: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
a280f72bee Replace messages fixtures with a factory. 2016-10-26 11:41:18 +01:00
Andy Allan
72ae20ea3c Replace user_preferences fixture with a factory. 2016-10-26 10:07:49 +01:00
Andy Allan
162f04d789 Convert ACL fixture to a factory, and add some tests
The fixture was unused, so I took the opportunity to put in a couple
of basic model tests.
2016-10-26 09:15:56 +01:00
Tom Hughes
6a9b0f05b2 Load user and language fixtures for diary model tests 2016-10-19 12:17:20 +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
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
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
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
bfe760a4b0 Replace friends fixture with a factory 2016-10-05 13:18:45 +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
Matt Amos
757a1aaa85 Made rubocop happy by formatting and minor syntax tweaks. 2016-08-22 17:24:10 +01:00
Shrey
683722ed5c Added IssueComments + ForeignKeys + Indexes 2016-08-22 16:15:12 +01:00
Shrey
5add3cf671 Basic models set up 2016-08-22 16:12:31 +01:00
Simon Poole
90b7101cc3 Add tests for change of gravatar use depending on email 2016-08-16 22:09:11 +02:00
Tom Hughes
c70a1fe933 Add support for GitHub authentication 2016-07-14 09:40:45 +01:00
Tom Hughes
72e71b9972 Fix rubocop warnings 2016-06-09 22:18:28 +01:00
Simon Legner
6f144e8b7d Show ref of object when no name is present 2016-03-09 18:47:54 +00:00
Aditya Prakash
341f6cd9fe Do not hyperlink profiles of deleted users 2016-02-15 20:47:53 +05:30
Tom Hughes
77c25dca8c Validate characters in changeset comments
Fixes #1135
Closes #1139
2016-01-19 09:51:24 +00:00
Tom Hughes
8fe1899596 Fix rubocop warnings 2016-01-19 09:51:24 +00:00
Tom Hughes
4028f4cdb9 Rework locale selection
Implement our own matching algorithm rather than trying to
patch the http_accept_language one and make sure everything is
using it in a consistent way.

Fixes #1125
2016-01-06 18:43:25 +00:00
Tom Hughes
098d1fc235 Allow customer URL schemas for OAuth callback URLs
Fixes #1019
2015-07-28 12:13:18 +01:00
Tom Hughes
2b2264ddab Add support for Windows Live authentication 2015-05-19 14:04:09 +01:00
Tom Hughes
c9893e186b Add support for Facebook authentication 2015-05-19 14:04:08 +01:00
Tom Hughes
ddaf43bc0e Add tests for Google OAuth authentication 2015-04-14 10:08:07 +01:00
Tom Hughes
2af0840ff3 Fix style issues found by new rubocop version 2015-04-14 09:38:24 +01:00
Tom Hughes
650adc10b2 Allow space as a language separator
The separator is supposed to be comma, so technically having
space instead is user error, but it seems to be very common.

Fixes #942
2015-03-31 20:53:51 +01:00
Tom Hughes
21d60e359a Tests! 2015-03-04 21:49:43 +00:00
Tom Hughes
15b550182c Yet more tests... 2015-03-02 21:20:01 +00:00
Tom Hughes
fd588cd715 The test train rolls ever onwards... 2015-03-01 17:04:39 +00:00
Tom Hughes
766246a960 Moar tests! 2015-03-01 12:59:53 +00:00
Tom Hughes
bc056a5e98 More test coverage improvements 2015-03-01 00:44:32 +00:00
Tom Hughes
857f0f460b More work on test coverage 2015-02-28 00:45:56 +00:00
Tom Hughes
cd3db7df4d Fix validation failures for trace tags
Fixes #914
2015-02-27 10:04:40 +00:00
Tom Hughes
f04211b172 Improve test coverage 2015-02-27 00:40:37 +00:00
Tom Hughes
a6b84a0294 Fix more rubocop style issues 2015-02-24 23:12:02 +00:00
Tom Hughes
c82c760e9d Load language fixtures before running the language tests 2015-02-22 19:26:53 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
5cbd4038ed Fix rubocop style issues 2015-02-20 08:56:16 +00:00