gitlab-org--gitlab-foss/spec/models
Sean McGivern d7a5a28c53 Fix pagination on sorts with lots of ties
Postgres and MySQL don't guarantee that pagination with `LIMIT` and
`OFFSET` will work if the ordering isn't unique. From the Postgres docs:

> When using `LIMIT`, it is important to use an `ORDER BY` clause that
> constrains the result rows into a unique order. Otherwise you will get
> an unpredictable subset of the query's rows

Before:

    [1] pry(main)> issues = 1.upto(Issue.count).map { |i| Issue.sort('priority').page(i).per(1).map(&:id) }.flatten
    [2] pry(main)> issues.count
    => 81
    [3] pry(main)> issues.uniq.count
    => 42

After:

    [1] pry(main)> issues = 1.upto(Issue.count).map { |i| Issue.sort('priority').page(i).per(1).map(&:id) }.flatten
    [2] pry(main)> issues.count
    => 81
    [3] pry(main)> issues.uniq.count
    => 81
2016-06-23 15:26:50 +01:00
..
ci Rename according to: 2016-06-20 16:52:05 +08:00
concerns Fix pagination on sorts with lots of ties 2016-06-23 15:26:50 +01:00
hooks Codestyle: make sure we have space around operators 2016-05-13 04:46:56 -03:00
members New Members::DestroyService 2016-06-18 05:46:45 +02:00
project_services Remove JiraIssue model and replace references with ExternalIssue 2016-06-16 01:25:18 +03:00
ability_spec.rb Refactor Participable 2016-06-01 16:22:35 +02:00
abuse_report_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
appearance_spec.rb
application_setting_spec.rb stub Devise.omniauth_providers to return GitHub even if the gitlab.yml has no omniauth provider enabled 2016-05-12 13:44:46 +03:00
award_emoji_spec.rb Incorportate feedback 2016-06-01 12:10:08 +02:00
blob_spec.rb
broadcast_message_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
build_spec.rb Fix builds API response not including commit data 2016-06-21 14:26:57 +02:00
commit_range_spec.rb Fix note validation spec failures 2016-06-01 10:31:46 -07:00
commit_spec.rb Optimize Banzai::Filter::RelativeLinkFilter 2016-06-21 10:53:16 -04:00
commit_status_spec.rb Fix builds API response not including commit data 2016-06-21 14:26:57 +02:00
deploy_key_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
deploy_keys_project_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
deployment_spec.rb Add specs for models and services 2016-06-14 13:51:12 +02:00
email_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
environment_spec.rb Add specs for models and services 2016-06-14 13:51:12 +02:00
event_spec.rb Project members with guest role can't access confidential issues 2016-06-13 19:32:00 -03:00
external_issue_spec.rb Hide number sign for string prefixed external issues 2016-04-12 10:01:52 +02:00
forked_project_link_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
generic_commit_status_spec.rb Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
global_milestone_spec.rb
group_spec.rb Turn Group#owners into a has_many association 2016-06-16 11:10:41 +02:00
identity_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
issue_spec.rb Update specs. Add CHANGELOG entry 2016-06-02 09:25:40 -04:00
key_spec.rb Remove Duplicated keys add UNIQUE index to fingerprint 2016-06-20 13:29:04 +02:00
label_link_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
label_spec.rb Merge branch 'remove-annotate-gem' into 'master' 2016-05-10 09:08:30 +00:00
legacy_diff_note_spec.rb Improve note factory 2016-05-29 15:03:00 -04:00
member_spec.rb New Members::DestroyService 2016-06-18 05:46:45 +02:00
merge_request_spec.rb Rename ci_commit -> pipeline 2016-06-10 14:41:38 +02:00
milestone_spec.rb Return a relation with Postgres 2016-05-16 10:25:24 +01:00
namespace_spec.rb Improve test coverage 2016-05-16 18:03:55 -05:00
note_spec.rb Project members with guest role can't access confidential issues 2016-06-13 19:32:00 -03:00
notification_setting_spec.rb Implement custom notification level options 2016-06-15 11:47:50 -03:00
personal_access_token_spec.rb Fix rubocop spec. 2016-06-03 10:11:36 +05:30
project_group_link_spec.rb Bring ProjectGroupLink model and migrations from EE 2016-03-11 17:47:05 +01:00
project_security_spec.rb Fix some specs 2016-03-20 22:55:08 +01:00
project_snippet_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
project_spec.rb Fixed ordering in Project.find_with_namespace 2016-06-16 13:04:59 +02:00
project_team_spec.rb UI and copywriting improvements 2016-06-14 13:18:14 +02:00
project_wiki_spec.rb Fix hook data for Wiki Page event 2016-05-31 11:24:58 -03:00
protected_branch_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
release_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
repository_spec.rb Add sorting dropdown to tag page 2016-06-16 13:33:29 -04:00
service_spec.rb Cache the presence of an issue_tracker at project level 2016-06-10 15:41:56 +02:00
snippet_spec.rb Refactor Participable 2016-06-01 16:22:35 +02:00
spam_log_spec.rb
todo_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
tree_spec.rb
user_spec.rb Add a blank line between before and it: 2016-06-07 22:34:09 +08:00
wiki_page_spec.rb