Commit graph

15 commits

Author SHA1 Message Date
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
Tom Hughes
c9fdd5d3cb Don't send note comment notifications to deleted users 2015-10-30 19:20:36 +00:00
Tom Hughes
5dc3e5b48a Don't show hidden notes to non-moderators in the user notes list
Fixes #921
2015-08-12 17:42:14 +01:00
Tom Hughes
1b6c214ab5 Add tests for new note GPX elements 2015-08-10 19:19:23 +01:00
Markus Heidelberg
166dc76ae9 Make notes GPX valid and add useful official elements
The "creator" attribute is required and "extensions" is the correct
name of this element.

Validated with SAXCount from the xerces-c package:

$ SAXCount -v=always -n -s -f notes.gpx

Original error messages:

    Error at file /home/markus/notes.gpx, line 2, char 171
      Message: no declaration found for element 'gpx'

    Error at file /home/markus/notes.gpx, line 2, char 171
      Message: attribute 'version' is not declared for element 'gpx'

After adding the "xmlns" attribute:

    Error at file /home/markus/notes.gpx, line 2, char 213
      Message: missing required attribute 'creator'

    Error at file /home/markus/notes.gpx, line 18, char 14
      Message: no declaration found for element 'extension'

    Error at file /home/markus/notes.gpx, line 26, char 7
      Message: element 'extension' is not allowed for content model '(ele?,time?,magvar?,geoidheight?,name?,cmt?,desc?,src?,link*,sym?,type?,fix?,sat?,hdop?,vdop?,pdop?,ageofdgpsdata?,dgpsid?,extensions?)'

The current errors now are caused by the missing XML schema for the
extensions.

Also add the time, name and link elements.
2015-08-10 19:11:18 +01:00
Tom Hughes
93fb360a08 Add a few more tests 2015-03-07 00:50:35 +00:00
Tom Hughes
77e8a16a15 Avoid relying on the order in which emails are sent 2015-03-05 00:16:26 +00:00
Tom Hughes
21d60e359a Tests! 2015-03-04 21:49:43 +00:00
Tom Hughes
dfc85f089a Test changeset and note comment notification emails 2015-03-02 00:43:07 +00:00
Tom Hughes
a79e6b9342 Load user_roles for permissions 2015-03-02 00:08:46 +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
6af8f8a9e3 Fix invalid CSS selectors 2015-01-10 12:41:09 +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/notes_controller_test.rb (Browse further)