summaryrefslogtreecommitdiff
path: root/spec/models/note_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Shut up, RuboCopfeature/note-validatorRobert Speicher2016-05-291-2/+2
| | | | :heart:
* Minor changes in note validation specsGrzegorz Bizon2016-05-291-5/+6
|
* Update specs to carry out changes in note factoryGrzegorz Bizon2016-05-291-2/+8
|
* Add more validation tests for note modelGrzegorz Bizon2016-05-291-0/+27
|
* Update note factory to include noteable associationGrzegorz Bizon2016-05-291-3/+3
|
* Update specsDouwe Maan2016-05-131-75/+1
|
* Extract LegacyDiffNote out of NoteDouwe Maan2016-05-131-6/+2
|
* Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-091-21/+0
| | | | | | | | | In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
* Merge branch 'rs-note-active-spec' into 'master'Robert Speicher2016-03-141-1/+61
|\ | | | | | | | | | | Add unit specs for `Note#active?` See merge request !3133
| * Add unit specs for `Note#active?`rs-note-active-specRobert Speicher2016-03-111-1/+61
| |
* | Disallow blank (non-null) values for a Note's `line_code` attributers-disallow-blank-line-codeRobert Speicher2016-03-111-0/+8
|/ | | | | | | | | | | | | It's unclear how these blank values got added, but GitLab.com had a few: ``` irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count => 439 ``` We've added a migration to convert any existing records to use a NULL value when blank, and updated Note to set blank values to nil before validation.
* Use ILIKE/LIKE for searching notesYorick Peterse2016-03-111-3/+9
|
* Remove redundant integration testsRobert Speicher2016-03-071-1/+1
| | | | | | | | | | These three tests were essentially checking that adding a note to something updated its `noteable`'s `updated_at` attribute. This is well-tested Rails behavior and we shouldn't feel the need to write an integration test to verify it. At most we should be ensuring that the association definition adds the `touch: true` option, which we now do in Note's unit test.
* Rename Tasks to TodosDouglas Barbosa Alexandre2016-02-201-1/+1
|
* Use destroy, in case we ever have before_destroy callbacks on TaskDouglas Barbosa Alexandre2016-02-201-1/+1
|
* Create a pending task when a user is mentioned on a noteDouglas Barbosa Alexandre2016-02-201-0/+2
|
* Improve #set_award! on the Note model12792-emoji-as-text-diff-commentZeger-Jan van de Weg2016-02-191-1/+4
|
* Emoji reponses on diffs aren't award emojiZeger-Jan van de Weg2016-02-191-2/+7
|
* Fix specs and rubocop warningsfix/private-referencesRémy Coutable2016-01-141-2/+2
|
* Add spec for Note#cross_reference_not_visible_for?Rémy Coutable2016-01-131-0/+24
|
* Add regression test.fix-banzai-cacheDouwe Maan2016-01-061-1/+14
|
* revert back vote buttons to issue and MR pagesValery Sizov2015-12-251-3/+8
|
* fix specemoji-picker-fixValery Sizov2015-12-241-2/+2
|
* emoji aliases problemValery Sizov2015-12-111-0/+9
|
* Don't allow to edit award emoji commentsemoji_edit_disallowValery Sizov2015-12-101-0/+17
|
* Tag model specsDouwe Maan2015-12-091-1/+1
|
* Update annotationsStan Hu2015-12-081-0/+1
|
* fox testsemoji_votesValery Sizov2015-11-191-3/+2
|
* added specsValery Sizov2015-11-191-0/+13
|
* added spinach testsValery Sizov2015-11-191-75/+0
|
* Fix mentionable specsDouwe Maan2015-10-121-3/+2
|
* Re-annotate modelsStan Hu2015-09-061-0/+1
|
* Case-insensetive search for commentscomment-case-insensetive-searchDmitriy Zaporozhets2015-08-191-0/+6
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Revert "Update noteable after a new note is added"revert_touchValery Sizov2015-08-051-1/+1
| | | | This reverts commit fbdaf0e2a517660c0e4e3960f20b2d3568c33e78.
* Rename abilities to correspond contoller/model action namesrename-abilitiesDmitriy Zaporozhets2015-06-261-3/+3
| | | | | | | | | | | | | | | | | write_ was renamed to create_ modify_ was renamed to update_ So now in update action we have next code def create can?(current_user, :create_issue, @issue) end def update can?(current_user, :update_issue, @issue) end Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Update noteable after a new note is addedJeroen van Baarsen2015-06-051-1/+1
| | | | | | | | | | | | | | **What does this do?** It makes sure that whenever a new note is added to an noteable item, the updated_at of that item is also updated. **Why is this needed?** At this moment when you post a comment on an issue or add a label to an issue, the updated_at is not changed. Because of this the filtering for least recently updated is not really useful (since it only takes in account the original text from the noteable). Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Simplify Note model specsRobert Speicher2015-05-111-213/+34
|
* Add a SystemNoteService classRobert Speicher2015-05-111-256/+0
| | | | | There's a lot of code in the Note model that only deals with creating system notes, so we're going to split that into its own class.
* Note's voting specs don't need to persist to the databaseRobert Speicher2015-05-101-18/+16
|
* Link cross-project cross-reference notes to correct project.Douwe Maan2015-04-241-11/+11
|
* Use project.commit convenience method.Douwe Maan2015-04-241-3/+3
|
* Correct usage of `subject` in specsRobert Speicher2015-04-161-1/+2
|
* Fix cross references when usernames, milestones, or project names contain ↵Stan Hu2015-03-191-11/+142
| | | | | | underscores. Remove emphasis from system notes to avoid Markdown conflicts in names.
* Updated rspec to rspec 3.x syntaxJeroen van Baarsen2015-02-121-87/+204
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Create a failing test where commit in mr creates a mr mention note.Marin Jankovski2014-11-051-0/+6
|
* Fix testsDmitriy Zaporozhets2014-10-101-2/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Use short_id instead of [0..N] for short version of commit shaDmitriy Zaporozhets2014-10-101-2/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Prevent PG::Error exception when check commit reference on commitDmitriy Zaporozhets2014-10-061-0/+20
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Make Mentionables work for cross-project refsVinnie Okada2014-10-031-2/+2
| | | | | Add a note to merge requests and issues when they're mentioned by a merge request, issue, or commit in another project.
* Replace project_access attribute with access_level in specs and APIDmitriy Zaporozhets2014-09-151-7/+7
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>