summaryrefslogtreecommitdiff
path: root/spec/models/note_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Huge replace of old users_project and users_group referencesDmitriy Zaporozhets2014-09-141-7/+7
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Remove mass assgnment specsDmitriy Zaporozhets2014-06-261-2/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Re-annotate modelsDmitriy Zaporozhets2014-04-091-3/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix tests that dont respect project-fork relationDmitriy Zaporozhets2014-04-031-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix bug with cross-reference note on commitDmitriy Zaporozhets2014-02-071-0/+10
| | | | | | | It should not set noteable_id if noteable_type is Commit We have Note#commit_id for this Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Make changes to testsDmitriy Zaporozhets2014-01-221-1/+1
| | | | | | | * project_with_code -> project * project -> ermpty_project Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add note for assignee changesDrew Blessing2014-01-061-0/+31
| | | | Change to username per @PixnBits suggestion
* added thumbsup and thumsdown emoji voting with rspec testsvagrant2013-11-281-0/+10
|