Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
4a29669d
Commit
4a29669d
authored
Dec 09, 2015
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into fix-edit-notes-on-merge-request-diff
parents
364041e7
cfe46f48
Changes
232
Hide whitespace changes
Inline
Side-by-side
Showing
232 changed files
with
453 additions
and
233 deletions
+453
-233
.gitlab-ci.yml
.gitlab-ci.yml
+31
-4
CHANGELOG
CHANGELOG
+2
-0
Gemfile
Gemfile
+0
-1
Gemfile.lock
Gemfile.lock
+0
-2
app/assets/stylesheets/framework/lists.scss
app/assets/stylesheets/framework/lists.scss
+8
-2
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+3
-7
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+10
-2
app/models/ability.rb
app/models/ability.rb
+4
-8
app/views/projects/tree/_tree_header.html.haml
app/views/projects/tree/_tree_header.html.haml
+1
-1
doc/api/projects.md
doc/api/projects.md
+0
-1
doc/update/8.1-to-8.2.md
doc/update/8.1-to-8.2.md
+1
-2
features/admin/groups.feature
features/admin/groups.feature
+16
-0
features/admin/projects.feature
features/admin/projects.feature
+16
-0
features/explore/projects.feature
features/explore/projects.feature
+19
-2
features/project/commits/branches.feature
features/project/commits/branches.feature
+1
-0
features/project/commits/comments.feature
features/project/commits/comments.feature
+1
-0
features/project/commits/commits.feature
features/project/commits/commits.feature
+1
-0
features/project/commits/diff_comments.feature
features/project/commits/diff_comments.feature
+1
-0
features/project/commits/tags.feature
features/project/commits/tags.feature
+1
-0
features/project/commits/user_lookup.feature
features/project/commits/user_lookup.feature
+1
-0
features/project/create.feature
features/project/create.feature
+2
-0
features/project/issues/award_emoji.feature
features/project/issues/award_emoji.feature
+1
-0
features/project/issues/filter_labels.feature
features/project/issues/filter_labels.feature
+1
-0
features/project/issues/issues.feature
features/project/issues/issues.feature
+1
-1
features/project/issues/labels.feature
features/project/issues/labels.feature
+1
-0
features/project/issues/milestones.feature
features/project/issues/milestones.feature
+1
-0
features/project/merge_requests.feature
features/project/merge_requests.feature
+1
-0
features/project/merge_requests/accept.feature
features/project/merge_requests/accept.feature
+1
-0
features/steps/admin/groups.rb
features/steps/admin/groups.rb
+29
-0
features/steps/admin/projects.rb
features/steps/admin/projects.rb
+37
-0
features/steps/explore/projects.rb
features/steps/explore/projects.rb
+1
-0
features/steps/project/create.rb
features/steps/project/create.rb
+1
-0
features/steps/shared/group.rb
features/steps/shared/group.rb
+4
-0
features/steps/shared/user.rb
features/steps/shared/user.rb
+8
-0
lib/tasks/spec.rake
lib/tasks/spec.rake
+28
-1
lib/tasks/spinach.rake
lib/tasks/spinach.rake
+23
-3
shared/lfs-objects/.gitkeep
shared/lfs-objects/.gitkeep
+0
-0
spec/features/atom/users_spec.rb
spec/features/atom/users_spec.rb
+1
-1
spec/lib/ci/ansi2html_spec.rb
spec/lib/ci/ansi2html_spec.rb
+1
-1
spec/lib/ci/charts_spec.rb
spec/lib/ci/charts_spec.rb
+1
-1
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+1
-1
spec/lib/disable_email_interceptor_spec.rb
spec/lib/disable_email_interceptor_spec.rb
+1
-1
spec/lib/extracts_path_spec.rb
spec/lib/extracts_path_spec.rb
+1
-1
spec/lib/file_size_validator_spec.rb
spec/lib/file_size_validator_spec.rb
+1
-1
spec/lib/git_ref_validator_spec.rb
spec/lib/git_ref_validator_spec.rb
+1
-1
spec/lib/gitlab/asciidoc_spec.rb
spec/lib/gitlab/asciidoc_spec.rb
+1
-1
spec/lib/gitlab/auth_spec.rb
spec/lib/gitlab/auth_spec.rb
+1
-1
spec/lib/gitlab/backend/grack_auth_spec.rb
spec/lib/gitlab/backend/grack_auth_spec.rb
+1
-1
spec/lib/gitlab/backend/shell_spec.rb
spec/lib/gitlab/backend/shell_spec.rb
+2
-2
spec/lib/gitlab/bitbucket_import/client_spec.rb
spec/lib/gitlab/bitbucket_import/client_spec.rb
+1
-1
spec/lib/gitlab/bitbucket_import/project_creator_spec.rb
spec/lib/gitlab/bitbucket_import/project_creator_spec.rb
+1
-1
spec/lib/gitlab/closing_issue_extractor_spec.rb
spec/lib/gitlab/closing_issue_extractor_spec.rb
+1
-1
spec/lib/gitlab/color_schemes_spec.rb
spec/lib/gitlab/color_schemes_spec.rb
+1
-1
spec/lib/gitlab/database_spec.rb
spec/lib/gitlab/database_spec.rb
+1
-1
spec/lib/gitlab/diff/file_spec.rb
spec/lib/gitlab/diff/file_spec.rb
+1
-1
spec/lib/gitlab/diff/parser_spec.rb
spec/lib/gitlab/diff/parser_spec.rb
+1
-1
spec/lib/gitlab/email/attachment_uploader_spec.rb
spec/lib/gitlab/email/attachment_uploader_spec.rb
+1
-1
spec/lib/gitlab/email/receiver_spec.rb
spec/lib/gitlab/email/receiver_spec.rb
+1
-1
spec/lib/gitlab/email/reply_parser_spec.rb
spec/lib/gitlab/email/reply_parser_spec.rb
+1
-1
spec/lib/gitlab/git_access_spec.rb
spec/lib/gitlab/git_access_spec.rb
+1
-1
spec/lib/gitlab/git_access_wiki_spec.rb
spec/lib/gitlab/git_access_wiki_spec.rb
+1
-1
spec/lib/gitlab/github_import/client_spec.rb
spec/lib/gitlab/github_import/client_spec.rb
+1
-1
spec/lib/gitlab/github_import/project_creator_spec.rb
spec/lib/gitlab/github_import/project_creator_spec.rb
+1
-1
spec/lib/gitlab/gitlab_import/client_spec.rb
spec/lib/gitlab/gitlab_import/client_spec.rb
+1
-1
spec/lib/gitlab/gitlab_import/project_creator_spec.rb
spec/lib/gitlab/gitlab_import/project_creator_spec.rb
+1
-1
spec/lib/gitlab/gitorious_import/project_creator_spec.rb
spec/lib/gitlab/gitorious_import/project_creator_spec.rb
+1
-1
spec/lib/gitlab/google_code_import/client_spec.rb
spec/lib/gitlab/google_code_import/client_spec.rb
+1
-1
spec/lib/gitlab/google_code_import/importer_spec.rb
spec/lib/gitlab/google_code_import/importer_spec.rb
+1
-1
spec/lib/gitlab/google_code_import/project_creator_spec.rb
spec/lib/gitlab/google_code_import/project_creator_spec.rb
+1
-1
spec/lib/gitlab/incoming_email_spec.rb
spec/lib/gitlab/incoming_email_spec.rb
+1
-1
spec/lib/gitlab/inline_diff_spec.rb
spec/lib/gitlab/inline_diff_spec.rb
+1
-1
spec/lib/gitlab/key_fingerprint_spec.rb
spec/lib/gitlab/key_fingerprint_spec.rb
+1
-1
spec/lib/gitlab/ldap/access_spec.rb
spec/lib/gitlab/ldap/access_spec.rb
+1
-1
spec/lib/gitlab/ldap/adapter_spec.rb
spec/lib/gitlab/ldap/adapter_spec.rb
+1
-1
spec/lib/gitlab/ldap/auth_hash_spec.rb
spec/lib/gitlab/ldap/auth_hash_spec.rb
+1
-1
spec/lib/gitlab/ldap/authentication_spec.rb
spec/lib/gitlab/ldap/authentication_spec.rb
+1
-1
spec/lib/gitlab/ldap/config_spec.rb
spec/lib/gitlab/ldap/config_spec.rb
+1
-1
spec/lib/gitlab/ldap/user_spec.rb
spec/lib/gitlab/ldap/user_spec.rb
+1
-1
spec/lib/gitlab/lfs/lfs_router_spec.rb
spec/lib/gitlab/lfs/lfs_router_spec.rb
+1
-1
spec/lib/gitlab/markdown/autolink_filter_spec.rb
spec/lib/gitlab/markdown/autolink_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/commit_range_reference_filter_spec.rb
...lib/gitlab/markdown/commit_range_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/cross_project_reference_spec.rb
spec/lib/gitlab/markdown/cross_project_reference_spec.rb
+1
-1
spec/lib/gitlab/markdown/emoji_filter_spec.rb
spec/lib/gitlab/markdown/emoji_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/external_issue_reference_filter_spec.rb
...b/gitlab/markdown/external_issue_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/external_link_filter_spec.rb
spec/lib/gitlab/markdown/external_link_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/issue_reference_filter_spec.rb
spec/lib/gitlab/markdown/issue_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/merge_request_reference_filter_spec.rb
...ib/gitlab/markdown/merge_request_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/redactor_filter_spec.rb
spec/lib/gitlab/markdown/redactor_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/reference_gatherer_filter_spec.rb
spec/lib/gitlab/markdown/reference_gatherer_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/relative_link_filter_spec.rb
spec/lib/gitlab/markdown/relative_link_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/sanitization_filter_spec.rb
spec/lib/gitlab/markdown/sanitization_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb
spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/table_of_contents_filter_spec.rb
spec/lib/gitlab/markdown/table_of_contents_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/task_list_filter_spec.rb
spec/lib/gitlab/markdown/task_list_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/upload_link_filter_spec.rb
spec/lib/gitlab/markdown/upload_link_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/user_reference_filter_spec.rb
spec/lib/gitlab/markdown/user_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markup_helper_spec.rb
spec/lib/gitlab/markup_helper_spec.rb
+1
-1
spec/lib/gitlab/note_data_builder_spec.rb
spec/lib/gitlab/note_data_builder_spec.rb
+1
-1
spec/lib/gitlab/o_auth/auth_hash_spec.rb
spec/lib/gitlab/o_auth/auth_hash_spec.rb
+1
-1
spec/lib/gitlab/o_auth/user_spec.rb
spec/lib/gitlab/o_auth/user_spec.rb
+1
-1
spec/lib/gitlab/popen_spec.rb
spec/lib/gitlab/popen_spec.rb
+1
-1
spec/lib/gitlab/project_search_results_spec.rb
spec/lib/gitlab/project_search_results_spec.rb
+1
-1
spec/lib/gitlab/push_data_builder_spec.rb
spec/lib/gitlab/push_data_builder_spec.rb
+1
-1
spec/lib/gitlab/reference_extractor_spec.rb
spec/lib/gitlab/reference_extractor_spec.rb
+1
-1
spec/lib/gitlab/regex_spec.rb
spec/lib/gitlab/regex_spec.rb
+1
-1
spec/lib/gitlab/sherlock/collection_spec.rb
spec/lib/gitlab/sherlock/collection_spec.rb
+1
-1
spec/lib/gitlab/sherlock/file_sample_spec.rb
spec/lib/gitlab/sherlock/file_sample_spec.rb
+1
-1
spec/lib/gitlab/sherlock/line_profiler_spec.rb
spec/lib/gitlab/sherlock/line_profiler_spec.rb
+1
-1
spec/lib/gitlab/sherlock/line_sample_spec.rb
spec/lib/gitlab/sherlock/line_sample_spec.rb
+1
-1
spec/lib/gitlab/sherlock/location_spec.rb
spec/lib/gitlab/sherlock/location_spec.rb
+1
-1
spec/lib/gitlab/sherlock/middleware_spec.rb
spec/lib/gitlab/sherlock/middleware_spec.rb
+1
-1
spec/lib/gitlab/sherlock/query_spec.rb
spec/lib/gitlab/sherlock/query_spec.rb
+1
-1
spec/lib/gitlab/sherlock/transaction_spec.rb
spec/lib/gitlab/sherlock/transaction_spec.rb
+1
-1
spec/lib/gitlab/sql/union_spec.rb
spec/lib/gitlab/sql/union_spec.rb
+1
-1
spec/lib/gitlab/themes_spec.rb
spec/lib/gitlab/themes_spec.rb
+1
-1
spec/lib/gitlab/upgrader_spec.rb
spec/lib/gitlab/upgrader_spec.rb
+1
-1
spec/lib/gitlab/uploads_transfer_spec.rb
spec/lib/gitlab/uploads_transfer_spec.rb
+1
-1
spec/lib/gitlab/url_builder_spec.rb
spec/lib/gitlab/url_builder_spec.rb
+1
-1
spec/lib/gitlab/version_info_spec.rb
spec/lib/gitlab/version_info_spec.rb
+1
-1
spec/lib/repository_cache_spec.rb
spec/lib/repository_cache_spec.rb
+1
-1
spec/models/broadcast_message_spec.rb
spec/models/broadcast_message_spec.rb
+1
-1
spec/models/build_spec.rb
spec/models/build_spec.rb
+1
-1
spec/models/ci/commit_spec.rb
spec/models/ci/commit_spec.rb
+1
-1
spec/models/ci/project_services/hip_chat_message_spec.rb
spec/models/ci/project_services/hip_chat_message_spec.rb
+1
-1
spec/models/ci/project_services/hip_chat_service_spec.rb
spec/models/ci/project_services/hip_chat_service_spec.rb
+1
-1
spec/models/ci/project_services/mail_service_spec.rb
spec/models/ci/project_services/mail_service_spec.rb
+1
-1
spec/models/ci/project_services/slack_message_spec.rb
spec/models/ci/project_services/slack_message_spec.rb
+1
-1
spec/models/ci/project_services/slack_service_spec.rb
spec/models/ci/project_services/slack_service_spec.rb
+1
-1
spec/models/ci/project_spec.rb
spec/models/ci/project_spec.rb
+1
-1
spec/models/ci/runner_project_spec.rb
spec/models/ci/runner_project_spec.rb
+1
-1
spec/models/ci/runner_spec.rb
spec/models/ci/runner_spec.rb
+1
-1
spec/models/ci/service_spec.rb
spec/models/ci/service_spec.rb
+1
-1
spec/models/ci/trigger_spec.rb
spec/models/ci/trigger_spec.rb
+1
-1
spec/models/ci/variable_spec.rb
spec/models/ci/variable_spec.rb
+1
-1
spec/models/ci/web_hook_spec.rb
spec/models/ci/web_hook_spec.rb
+1
-1
spec/models/commit_range_spec.rb
spec/models/commit_range_spec.rb
+1
-1
spec/models/commit_spec.rb
spec/models/commit_spec.rb
+1
-1
spec/models/commit_status_spec.rb
spec/models/commit_status_spec.rb
+1
-1
spec/models/concerns/case_sensitivity_spec.rb
spec/models/concerns/case_sensitivity_spec.rb
+1
-1
spec/models/deploy_key_spec.rb
spec/models/deploy_key_spec.rb
+1
-1
spec/models/deploy_keys_project_spec.rb
spec/models/deploy_keys_project_spec.rb
+1
-1
spec/models/event_spec.rb
spec/models/event_spec.rb
+1
-1
spec/models/external_issue_spec.rb
spec/models/external_issue_spec.rb
+1
-1
spec/models/external_wiki_service_spec.rb
spec/models/external_wiki_service_spec.rb
+1
-1
spec/models/generic_commit_status_spec.rb
spec/models/generic_commit_status_spec.rb
+1
-1
spec/models/global_milestone_spec.rb
spec/models/global_milestone_spec.rb
+1
-1
spec/models/group_spec.rb
spec/models/group_spec.rb
+1
-1
spec/models/hooks/project_hook_spec.rb
spec/models/hooks/project_hook_spec.rb
+1
-1
spec/models/hooks/service_hook_spec.rb
spec/models/hooks/service_hook_spec.rb
+1
-1
spec/models/hooks/system_hook_spec.rb
spec/models/hooks/system_hook_spec.rb
+1
-1
spec/models/hooks/web_hook_spec.rb
spec/models/hooks/web_hook_spec.rb
+1
-1
spec/models/issue_spec.rb
spec/models/issue_spec.rb
+1
-1
spec/models/key_spec.rb
spec/models/key_spec.rb
+1
-1
spec/models/label_link_spec.rb
spec/models/label_link_spec.rb
+1
-1
spec/models/label_spec.rb
spec/models/label_spec.rb
+1
-1
spec/models/member_spec.rb
spec/models/member_spec.rb
+1
-1
spec/models/members/group_member_spec.rb
spec/models/members/group_member_spec.rb
+1
-1
spec/models/members/project_member_spec.rb
spec/models/members/project_member_spec.rb
+1
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-1
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+1
-1
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+1
-1
spec/models/note_spec.rb
spec/models/note_spec.rb
+1
-1
spec/models/project_security_spec.rb
spec/models/project_security_spec.rb
+1
-1
spec/models/project_services/buildkite_service_spec.rb
spec/models/project_services/buildkite_service_spec.rb
+1
-1
spec/models/project_services/drone_ci_service_spec.rb
spec/models/project_services/drone_ci_service_spec.rb
+1
-1
spec/models/project_services/flowdock_service_spec.rb
spec/models/project_services/flowdock_service_spec.rb
+1
-1
spec/models/project_services/gemnasium_service_spec.rb
spec/models/project_services/gemnasium_service_spec.rb
+1
-1
spec/models/project_services/gitlab_ci_service_spec.rb
spec/models/project_services/gitlab_ci_service_spec.rb
+1
-1
spec/models/project_services/gitlab_issue_tracker_service_spec.rb
...els/project_services/gitlab_issue_tracker_service_spec.rb
+1
-1
spec/models/project_services/hipchat_service_spec.rb
spec/models/project_services/hipchat_service_spec.rb
+1
-1
spec/models/project_services/irker_service_spec.rb
spec/models/project_services/irker_service_spec.rb
+1
-1
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+1
-1
spec/models/project_services/pushover_service_spec.rb
spec/models/project_services/pushover_service_spec.rb
+1
-1
spec/models/project_services/slack_service/issue_message_spec.rb
...dels/project_services/slack_service/issue_message_spec.rb
+1
-1
spec/models/project_services/slack_service/merge_message_spec.rb
...dels/project_services/slack_service/merge_message_spec.rb
+1
-1
spec/models/project_services/slack_service/note_message_spec.rb
...odels/project_services/slack_service/note_message_spec.rb
+1
-1
spec/models/project_services/slack_service/push_message_spec.rb
...odels/project_services/slack_service/push_message_spec.rb
+1
-1
spec/models/project_services/slack_service_spec.rb
spec/models/project_services/slack_service_spec.rb
+1
-1
spec/models/project_snippet_spec.rb
spec/models/project_snippet_spec.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
spec/models/project_team_spec.rb
spec/models/project_team_spec.rb
+1
-1
spec/models/project_wiki_spec.rb
spec/models/project_wiki_spec.rb
+1
-1
spec/models/protected_branch_spec.rb
spec/models/protected_branch_spec.rb
+1
-1
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+1
-1
spec/models/service_spec.rb
spec/models/service_spec.rb
+1
-1
spec/models/snippet_spec.rb
spec/models/snippet_spec.rb
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+1
-1
spec/models/wiki_page_spec.rb
spec/models/wiki_page_spec.rb
+1
-1
spec/services/archive_repository_service_spec.rb
spec/services/archive_repository_service_spec.rb
+1
-1
spec/services/ci/create_commit_service_spec.rb
spec/services/ci/create_commit_service_spec.rb
+1
-1
spec/services/ci/create_trigger_request_service_spec.rb
spec/services/ci/create_trigger_request_service_spec.rb
+1
-1
spec/services/ci/event_service_spec.rb
spec/services/ci/event_service_spec.rb
+1
-1
spec/services/ci/image_for_build_service_spec.rb
spec/services/ci/image_for_build_service_spec.rb
+1
-1
spec/services/ci/register_build_service_spec.rb
spec/services/ci/register_build_service_spec.rb
+1
-1
spec/services/ci/web_hook_service_spec.rb
spec/services/ci/web_hook_service_spec.rb
+1
-1
spec/services/create_release_service_spec.rb
spec/services/create_release_service_spec.rb
+1
-1
spec/services/create_snippet_service_spec.rb
spec/services/create_snippet_service_spec.rb
+1
-1
spec/services/destroy_group_service_spec.rb
spec/services/destroy_group_service_spec.rb
+1
-1
spec/services/event_create_service_spec.rb
spec/services/event_create_service_spec.rb
+1
-1
spec/services/git_hooks_service_spec.rb
spec/services/git_hooks_service_spec.rb
+1
-1
spec/services/git_push_service_spec.rb
spec/services/git_push_service_spec.rb
+1
-1
spec/services/git_tag_push_service_spec.rb
spec/services/git_tag_push_service_spec.rb
+1
-1
spec/services/issues/bulk_update_service_spec.rb
spec/services/issues/bulk_update_service_spec.rb
+1
-1
spec/services/issues/close_service_spec.rb
spec/services/issues/close_service_spec.rb
+1
-1
spec/services/issues/create_service_spec.rb
spec/services/issues/create_service_spec.rb
+1
-1
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+1
-1
spec/services/merge_requests/close_service_spec.rb
spec/services/merge_requests/close_service_spec.rb
+1
-1
spec/services/merge_requests/create_service_spec.rb
spec/services/merge_requests/create_service_spec.rb
+1
-1
spec/services/merge_requests/merge_service_spec.rb
spec/services/merge_requests/merge_service_spec.rb
+1
-1
spec/services/merge_requests/refresh_service_spec.rb
spec/services/merge_requests/refresh_service_spec.rb
+1
-1
spec/services/merge_requests/reopen_service_spec.rb
spec/services/merge_requests/reopen_service_spec.rb
+1
-1
spec/services/merge_requests/update_service_spec.rb
spec/services/merge_requests/update_service_spec.rb
+1
-1
spec/services/milestones/close_service_spec.rb
spec/services/milestones/close_service_spec.rb
+1
-1
spec/services/milestones/create_service_spec.rb
spec/services/milestones/create_service_spec.rb
+1
-1
spec/services/notes/create_service_spec.rb
spec/services/notes/create_service_spec.rb
+1
-1
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+1
-1
spec/services/projects/create_service_spec.rb
spec/services/projects/create_service_spec.rb
+1
-1
spec/services/projects/destroy_service_spec.rb
spec/services/projects/destroy_service_spec.rb
+1
-1
spec/services/projects/download_service_spec.rb
spec/services/projects/download_service_spec.rb
+1
-1
spec/services/projects/fork_service_spec.rb
spec/services/projects/fork_service_spec.rb
+1
-1
spec/services/projects/transfer_service_spec.rb
spec/services/projects/transfer_service_spec.rb
+1
-1
spec/services/projects/update_service_spec.rb
spec/services/projects/update_service_spec.rb
+1
-1
spec/services/projects/upload_service_spec.rb
spec/services/projects/upload_service_spec.rb
+1
-1
spec/services/search_service_spec.rb
spec/services/search_service_spec.rb
+1
-1
spec/services/system_hooks_service_spec.rb
spec/services/system_hooks_service_spec.rb
+1
-1
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+1
-1
spec/services/test_hook_service_spec.rb
spec/services/test_hook_service_spec.rb
+1
-1
spec/services/update_release_service_spec.rb
spec/services/update_release_service_spec.rb
+1
-1
spec/services/update_snippet_service_spec.rb
spec/services/update_snippet_service_spec.rb
+1
-1
No files found.
.gitlab-ci.yml
View file @
4a29669d
...
...
@@ -24,6 +24,27 @@ spec:api:
-
ruby
-
mysql
spec:models:
script
:
-
RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models
tags
:
-
ruby
-
mysql
spec:lib:
script
:
-
RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib
tags
:
-
ruby
-
mysql
spec:services:
script
:
-
RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services
tags
:
-
ruby
-
mysql
spec:benchmark:
script
:
-
RAILS_ENV=test bundle exec rake spec:benchmark
...
...
@@ -39,9 +60,16 @@ spec:other:
-
ruby
-
mysql
spinach:project:
spinach:project:
half:
script
:
-
RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project
-
RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half
tags
:
-
ruby
-
mysql
spinach:project:rest:
script
:
-
RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest
tags
:
-
ruby
-
mysql
...
...
@@ -89,10 +117,9 @@ flay:
-
mysql
bundler:audit:
script
:
script
:
-
"
bundle
exec
bundle-audit
update"
-
"
bundle
exec
bundle-audit
check"
tags
:
-
ruby
-
mysql
allow_failure
:
true
CHANGELOG
View file @
4a29669d
...
...
@@ -27,6 +27,7 @@ v 8.3.0 (unreleased)
- Block LDAP user when they are no longer found in the LDAP server
- Improve wording on project visibility levels (Zeger-Jan van de Weg)
- Fix editing notes on a merge request diff
- Automatically select default clone protocol based on user preferences (Eirik Lygre)
v 8.2.3
- Fix application settings cache not expiring after changes (Stan Hu)
...
...
@@ -41,6 +42,7 @@ v 8.2.2
- Fix Error 500 when viewing user's personal projects from admin page (Stan Hu)
- Fix: Raw private snippets access workflow
- Prevent "413 Request entity too large" errors when pushing large files with LFS
- Fix: As an admin, cannot add oneself as a member to a group/project
- Fix invalid links within projects dashboard header
- Make current user the first user in assignee dropdown in issues detail page (Stan Hu)
- Fix: duplicate email notifications on issue comments
...
...
Gemfile
View file @
4a29669d
...
...
@@ -93,7 +93,6 @@ gem 'html-pipeline', '~> 1.11.0'
gem
'
task_list
'
,
'~> 1.0.2'
,
require:
'task_list/railtie'
gem
'
github-markup
'
,
'~> 1.3.1'
gem
'
redcarpet
'
,
'~> 3.3.3'
gem
'
RedCloth
'
,
'~> 4.2.9'
gem
'
rdoc
'
,
'~>3.6'
gem
'
org-ruby
'
,
'~> 0.9.12'
gem
'
creole
'
,
'~> 0.5.0'
...
...
Gemfile.lock
View file @
4a29669d
...
...
@@ -2,7 +2,6 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.2)
RedCloth (4.2.9)
ace-rails-ap (2.0.1)
actionmailer (4.2.4)
actionpack (= 4.2.4)
...
...
@@ -826,7 +825,6 @@ PLATFORMS
ruby
DEPENDENCIES
RedCloth (~> 4.2.9)
ace-rails-ap (~> 2.0.1)
activerecord-deprecated_finders (~> 1.0.3)
activerecord-session_store (~> 0.1.0)
...
...
app/assets/stylesheets/framework/lists.scss
View file @
4a29669d
...
...
@@ -88,8 +88,14 @@ ul.bordered-list {
}
}
li
.task-list-item
{
list-style-type
:
none
;
ul
.task-list
{
li
.task-list-item
{
list-style-type
:
none
;
}
ul
:not
(
.task-list
)
{
padding-left
:
1
.3em
;
}
}
ul
.content-list
{
...
...
app/assets/stylesheets/pages/notes.scss
View file @
4a29669d
...
...
@@ -109,13 +109,9 @@ ul.notes {
}
}
// Reduce left padding of first task list ul element
ul
.task-list
:first-child
{
padding-left
:
10px
;
// sub-tasks should be padded normally
ul
{
padding-left
:
20px
;
ul
.task-list
{
ul
:not
(
.task-list
)
{
padding-left
:
1
.3em
;
}
}
...
...
app/helpers/projects_helper.rb
View file @
4a29669d
...
...
@@ -175,11 +175,19 @@ module ProjectsHelper
end
def
default_url_to_repo
(
project
=
@project
)
current_user
?
project
.
url_to_repo
:
project
.
http_url_to_repo
if
default_clone_protocol
==
"ssh"
project
.
ssh_url_to_repo
else
project
.
http_url_to_repo
end
end
def
default_clone_protocol
current_user
?
"ssh"
:
"http"
if
!
current_user
||
current_user
.
require_ssh_key?
"http"
else
"ssh"
end
end
def
project_last_activity
(
project
)
...
...
app/models/ability.rb
View file @
4a29669d
...
...
@@ -346,12 +346,10 @@ class Ability
unless
group
.
last_owner?
(
target_user
)
can_manage
=
group_abilities
(
user
,
group
).
include?
(
:admin_group_member
)
if
can_manage
&&
user
!=
target_user
if
can_manage
rules
<<
:update_group_member
rules
<<
:destroy_group_member
end
if
user
==
target_user
elsif
user
==
target_user
rules
<<
:destroy_group_member
end
end
...
...
@@ -367,12 +365,10 @@ class Ability
unless
target_user
==
project
.
owner
can_manage
=
project_abilities
(
user
,
project
).
include?
(
:admin_project_member
)
if
can_manage
&&
user
!=
target_user
if
can_manage
rules
<<
:update_project_member
rules
<<
:destroy_project_member
end
if
user
==
target_user
elsif
user
==
target_user
rules
<<
:destroy_project_member
end
end
...
...
app/views/projects/tree/_tree_header.html.haml
View file @
4a29669d
...
...
@@ -32,5 +32,5 @@
New directory
-
elsif
!
on_top_of_branch?
%li
%span
.btn.add-to-tree.disabled.has_tooltip
{
title:
"You can only add files when you are on a branch."
,
data:
{
container:
'body'
}}
%span
.btn.
btn-sm.
add-to-tree.disabled.has_tooltip
{
title:
"You can only add files when you are on a branch."
,
data:
{
container:
'body'
}}
=
icon
(
'plus'
)
doc/api/projects.md
View file @
4a29669d
...
...
@@ -398,7 +398,6 @@ Parameters:
-
`user_id`
(required) - user_id of owner
-
`name`
(required) - new project name
-
`description`
(optional) - short project description
-
`default_branch`
(optional) - 'master' by default
-
`issues_enabled`
(optional)
-
`merge_requests_enabled`
(optional)
-
`builds_enabled`
(optional)
...
...
doc/update/8.1-to-8.2.md
View file @
4a29669d
...
...
@@ -85,11 +85,10 @@ sudo -u git -H git checkout 0.4.2
sudo
-u
git
-H
make
```
Update the GitLab
init script and
'default' file.
Update the GitLab 'default' file.
```
cd /home/git/gitlab
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
test -e /etc/default/gitlab && \
sudo sed -i.pre-8.2 's/^\([^=]*\)gitlab_git_http_server/\1gitlab_workhorse/' /etc/default/gitlab
```
...
...
features/admin/groups.feature
View file @
4a29669d
...
...
@@ -33,3 +33,19 @@ Feature: Admin Groups
When
I visit admin group page
When
I select user
"johndoe@gitlab.com"
from user list as
"Reporter"
Then
I should see
"johndoe@gitlab.com"
in team list in every project as
"Reporter"
@javascript
Scenario
:
Signed in admin should be able to add himself to a group
Given
"John Doe"
is owner of group
"Owned"
When
I visit group
"Owned"
members page
When
I select current user as
"Developer"
Then
I should see current user as
"Developer"
@javascript
Scenario
:
Signed in admin should be able to remove himself from group
Given
current user is developer of group
"Owned"
When
I visit group
"Owned"
members page
Then
I should see current user as
"Developer"
When
I click on the
"Remove User From Group"
button for current user
When
I visit group
"Owned"
members page
Then
I should not see current user as
"Developer"
features/admin/projects.feature
View file @
4a29669d
...
...
@@ -27,3 +27,19 @@ Feature: Admin Projects
And
I visit admin project page
When
I transfer project to group 'Web'
Then
I should see project transfered
@javascript
Scenario
:
Signed in admin should be able to add himself to a project
Given
"John Doe"
owns private project
"Enterprise"
When
I visit project
"Enterprise"
members page
When
I select current user as
"Developer"
Then
I should see current user as
"Developer"
@javascript
Scenario
:
Signed in admin should be able to remove himself from a project
Given
"John Doe"
owns private project
"Enterprise"
And
current user is developer of project
"Enterprise"
When
I visit project
"Enterprise"
members page
Then
I should see current user as
"Developer"
When
I click on the
"Remove User From Project"
button for current user
Then
I should not see current user as
"Developer"
features/explore/projects.feature
View file @
4a29669d
...
...
@@ -31,8 +31,17 @@ Feature: Explore Projects
Then
I should see empty public project details
And
I should see empty public project details with http clone info
Scenario
:
I
visit an empty public project page as user
Scenario
:
I
visit an empty public project page as user
with no ssh-keys
Given
I sign in as a user
And
I have no ssh keys
And
public empty project
"Empty Public Project"
When
I visit empty project page
Then
I should see empty public project details
And
I should see empty public project details with http clone info
Scenario
:
I
visit an empty public project page as user with an ssh-key
Given
I sign in as a user
And
I have an ssh key
And
public empty project
"Empty Public Project"
When
I visit empty project page
Then
I should see empty public project details
...
...
@@ -57,8 +66,16 @@ Feature: Explore Projects
Then
I should see project
"Community"
home page
And
I should see an http link to the repository
Scenario
:
I
visit public project page as user
Scenario
:
I
visit public project page as user with no ssh-keys
Given
I sign in as a user
And
I have no ssh keys
When
I visit project
"Community"
page
Then
I should see project
"Community"
home page
And
I should see an http link to the repository
Scenario
:
I
visit public project page as user with an ssh-key
Given
I sign in as a user
And
I have an ssh key
When
I visit project
"Community"
page
Then
I should see project
"Community"
home page
And
I should see an ssh link to the repository
...
...
features/project/commits/branches.feature
View file @
4a29669d
@project_commits
Feature
:
Project Commits Branches
Background
:
Given
I sign in as a user
...
...
features/project/commits/comments.feature
View file @
4a29669d
@project_commits
Feature
:
Project Commits Comments
Background
:
Given
I sign in as a user
...
...
features/project/commits/commits.feature
View file @
4a29669d
@project_commits
Feature
:
Project Commits
Background
:
Given
I sign in as a user
...
...
features/project/commits/diff_comments.feature
View file @
4a29669d
@project_commits
Feature
:
Project Commits Diff Comments
Background
:
Given
I sign in as a user
...
...
features/project/commits/tags.feature
View file @
4a29669d
@project_commits
Feature
:
Project Commits Tags
Background
:
Given
I sign in as a user
...
...
features/project/commits/user_lookup.feature
View file @
4a29669d
@project_commits
Feature
:
Project Commits User Lookup
Background
:
Given
I sign in as a user
...
...
features/project/create.feature
View file @
4a29669d
...
...
@@ -7,6 +7,7 @@ Feature: Project Create
Scenario
:
User create a project
Given
I sign in as a user
When
I visit new project page
And
I have an ssh key
And
fill project form with valid data
Then
I should see project page
And
I should see empty project instuctions
...
...
@@ -14,6 +15,7 @@ Feature: Project Create
@javascript
Scenario
:
Empty project instructions
Given
I sign in as a user
And
I have an ssh key
When
I visit new project page
And
fill project form with valid data
Then
I see empty project instuctions
...
...
features/project/issues/award_emoji.feature
View file @
4a29669d
@project_issues
Feature
:
Award Emoji
Background
:
Given
I sign in as a user
...
...
features/project/issues/filter_labels.feature
View file @
4a29669d
@project_issues
Feature
:
Project Issues Filter Labels
Background
:
Given
I sign in as a user
...
...
features/project/issues/issues.feature
View file @
4a29669d
@project_issues
Feature
:
Project Issues
Background
:
Given
I sign in as a user
...
...
@@ -196,4 +197,3 @@ Feature: Project Issues
And
I should not see labels field
And
I submit new issue
"500 error on profile"
Then
I should see issue
"500 error on profile"
features/project/issues/labels.feature
View file @
4a29669d
@project_issues
Feature
:
Project Issues Labels
Background
:
Given
I sign in as a user
...
...
features/project/issues/milestones.feature
View file @
4a29669d
@project_issues
Feature
:
Project Issues Milestones
Background
:
Given
I sign in as a user
...
...
features/project/merge_requests.feature
View file @
4a29669d
@project_merge_requests
Feature
:
Project Merge Requests
Background
:
Given
I sign in as a user
...
...
features/project/merge_requests/accept.feature
View file @
4a29669d
@project_merge_requests
Feature
:
Project Merge Requests Acceptance
Background
:
Given
There is an open Merge Request
...
...
features/steps/admin/groups.rb
View file @
4a29669d
class
Spinach::Features::AdminGroups
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedGroup
include
SharedPaths
include
SharedUser
include
SharedActiveTab
...
...
@@ -88,6 +89,34 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
end
end
step
'I select current user as "Developer"'
do
page
.
within
".users-group-form"
do
select2
(
current_user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
select
"Developer"
,
from:
"access_level"
end
click_button
"Add users to group"
end
step
'I should see current user as "Developer"'
do
page
.
within
'.content-list'
do
expect
(
page
).
to
have_content
(
current_user
.
name
)
expect
(
page
).
to
have_content
(
'Developer'
)
end
end
step
'I click on the "Remove User From Group" button for current user'
do
find
(
:css
,
'li'
,
text:
current_user
.
name
).
find
(
:css
,
'a.btn-remove'
).
click
# poltergeist always confirms popups.
end
step
'I should not see current user as "Developer"'
do
page
.
within
'.content-list'
do
expect
(
page
).
not_to
have_content
(
current_user
.
name
)
expect
(
page
).
not_to
have_content
(
'Developer'
)
end
end
protected
def
current_group
...
...
features/steps/admin/projects.rb
View file @
4a29669d
...
...
@@ -3,6 +3,8 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
include
SharedPaths
include
SharedAdmin
include
SharedProject
include
SharedUser
include
Select2Helper
step
'I should see all non-archived projects'
do
Project
.
non_archived
.
each
do
|
p
|
...
...
@@ -56,6 +58,41 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
expect
(
page
).
to
have_content
'Namespace: Web'
end
step
'I visit project "Enterprise" members page'
do
project
=
Project
.
find_by!
(
name:
"Enterprise"
)
visit
namespace_project_project_members_path
(
project
.
namespace
,
project
)
end
step
'I select current user as "Developer"'
do
page
.
within
".users-project-form"
do
select2
(
current_user
.
id
,
from:
"#user_ids"
,
multiple:
true
)
select
"Developer"
,
from:
"access_level"
end
click_button
"Add users to project"
end
step
'I should see current user as "Developer"'
do
page
.
within
'.content-list'
do
expect
(
page
).
to
have_content
(
current_user
.
name
)
expect
(
page
).
to
have_content
(
'Developer'
)
end
end
step
'current user is developer of project "Enterprise"'
do
project
=
Project
.
find_by!
(
name:
"Enterprise"
)
project
.
team
<<
[
current_user
,
:developer
]
end
step
'I click on the "Remove User From Project" button for current user'
do
find
(
:css
,
'li'
,
text:
current_user
.
name
).
find
(
:css
,
'a.btn-remove'
).
click
# poltergeist always confirms popups.
end
step
'I should not see current_user as "Developer"'
do
expect
(
page
).
not_to
have_selector
(
:css
,
'.content-list'
)
end
def
project
@project
||=
Project
.
first
end
...
...
features/steps/explore/projects.rb
View file @
4a29669d
...
...
@@ -2,6 +2,7 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedProject
include
SharedUser
step
'I should see project "Empty Public Project"'
do
expect
(
page
).
to
have_content
"Empty Public Project"
...
...
features/steps/project/create.rb
View file @
4a29669d
class
Spinach::Features::ProjectCreate
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedUser
step
'fill project form with valid data'
do
fill_in
'project_path'
,
with:
'Empty'
...
...
features/steps/shared/group.rb
View file @
4a29669d
module
SharedGroup
include
Spinach
::
DSL
step
'current user is developer of group "Owned"'
do
is_member_of
(
current_user
.
name
,
"Owned"
,
Gitlab
::
Access
::
DEVELOPER
)
end
step
'"John Doe" is owner of group "Owned"'
do
is_member_of
(
"John Doe"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
end
...
...
features/steps/shared/user.rb
View file @
4a29669d
...
...
@@ -18,4 +18,12 @@ module SharedUser
def
user_exists
(
name
,
options
=
{})
User
.
find_by
(
name:
name
)
||
create
(
:user
,
{
name:
name
,
admin:
false
}.
merge
(
options
))
end
step
'I have an ssh key'
do
create
(
:personal_key
,
user:
@user
)
end
step
'I have no ssh keys'
do
@user
.
keys
.
delete_all
end
end
lib/tasks/spec.rake
View file @
4a29669d
...
...
@@ -19,6 +19,33 @@ namespace :spec do
run_commands
(
cmds
)
end
desc
'GitLab | Rspec | Run model specs'
task
:models
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(rspec spec --tag @models)
]
run_commands
(
cmds
)
end
desc
'GitLab | Rspec | Run service specs'
task
:services
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(rspec spec --tag @services)
]
run_commands
(
cmds
)
end
desc
'GitLab | Rspec | Run lib specs'
task
:lib
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(rspec spec --tag @lib)
]
run_commands
(
cmds
)
end
desc
'GitLab | Rspec | Run benchmark specs'
task
:benchmark
do
cmds
=
[
...
...
@@ -32,7 +59,7 @@ namespace :spec do
task
:other
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(rspec spec --tag ~@api --tag ~@feature --tag ~@benchmark)
%W(rspec spec --tag ~@api --tag ~@feature --tag ~@
models --tag ~@lib --tag ~@services --tag ~@
benchmark)
]
run_commands
(
cmds
)
end
...
...
lib/tasks/spinach.rake
View file @
4a29669d
Rake
::
Task
[
"spinach"
].
clear
if
Rake
::
Task
.
task_defined?
(
'spinach'
)
namespace
:spinach
do
namespace
:project
do
desc
"GitLab | Spinach | Run project commits, issues and merge requests spinach features"
task
:half
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(spinach --tags @project_commits,@project_issues,@project_merge_requests)
,
]
run_commands
(
cmds
)
end
desc
"GitLab | Spinach | Run remaining project spinach features"
task
:rest
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets,~@project_commits,~@project_issues,~@project_merge_requests)
,
]
run_commands
(
cmds
)
end
end
desc
"GitLab | Spinach | Run project spinach features"
task
:project
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets
,~@commits
)
,
%W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets)
,
]
run_commands
(
cmds
)
end
...
...
@@ -14,7 +34,7 @@ namespace :spinach do
task
:other
do
cmds
=
[
%W(rake gitlab:setup)
,
%W(spinach --tags @admin,@dashboard,@profile,@public,@snippets
,@commits
)
,
%W(spinach --tags @admin,@dashboard,@profile,@public,@snippets)
,
]
run_commands
(
cmds
)
end
...
...
@@ -33,4 +53,4 @@ def run_commands(cmds)
cmds
.
each
do
|
cmd
|
system
({
'RAILS_ENV'
=>
'test'
,
'force'
=>
'yes'
},
*
cmd
)
or
raise
(
"
#{
cmd
}
failed!"
)
end
end
\ No newline at end of file
end
shared/lfs-objects/.gitkeep
0 → 100644
View file @
4a29669d
spec/features/atom/users_spec.rb
View file @
4a29669d
...
...
@@ -79,6 +79,6 @@ describe "User Feed", feature: true do
end
def
safe_name
html_escape
(
user
.
name
)
CGI
.
escapeHTML
(
user
.
name
)
end
end
spec/lib/ci/ansi2html_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Ci
::
Ansi2html
do
describe
Ci
::
Ansi2html
,
lib:
true
do
subject
{
Ci
::
Ansi2html
}
it
"prints non-ansi as-is"
do
...
...
spec/lib/ci/charts_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
"Charts"
do
describe
Ci
::
Charts
,
lib:
true
do
context
"build_times"
do
before
do
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Ci
describe
GitlabCiYamlProcessor
do
describe
GitlabCiYamlProcessor
,
lib:
true
do
let
(
:path
)
{
'path'
}
describe
"#builds_for_ref"
do
...
...
spec/lib/disable_email_interceptor_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
DisableEmailInterceptor
do
describe
DisableEmailInterceptor
,
lib:
true
do
before
do
ActionMailer
::
Base
.
register_interceptor
(
DisableEmailInterceptor
)
end
...
...
spec/lib/extracts_path_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
ExtractsPath
do
describe
ExtractsPath
,
lib:
true
do
include
ExtractsPath
include
RepoHelpers
include
Gitlab
::
Application
.
routes
.
url_helpers
...
...
spec/lib/file_size_validator_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
'Gitlab::FileSizeValidatorSpec'
do
describe
FileSizeValidator
,
lib:
true
do
let
(
:validator
)
{
FileSizeValidator
.
new
(
options
)
}
let
(
:attachment
)
{
AttachmentUploader
.
new
}
let
(
:note
)
{
create
(
:note
)
}
...
...
spec/lib/git_ref_validator_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GitRefValidator
do
describe
Gitlab
::
GitRefValidator
,
lib:
true
do
it
{
expect
(
Gitlab
::
GitRefValidator
.
validate
(
'feature/new'
)).
to
be_truthy
}
it
{
expect
(
Gitlab
::
GitRefValidator
.
validate
(
'implement_@all'
)).
to
be_truthy
}
it
{
expect
(
Gitlab
::
GitRefValidator
.
validate
(
'my_new_feature'
)).
to
be_truthy
}
...
...
spec/lib/gitlab/asciidoc_spec.rb
View file @
4a29669d
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
require
'nokogiri'
module
Gitlab
describe
Asciidoc
do
describe
Asciidoc
,
lib:
true
do
let
(
:input
)
{
'<b>ascii</b>'
}
let
(
:context
)
{
{}
}
...
...
spec/lib/gitlab/auth_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Auth
do
describe
Gitlab
::
Auth
,
lib:
true
do
let
(
:gl_auth
)
{
Gitlab
::
Auth
.
new
}
describe
:find
do
...
...
spec/lib/gitlab/backend/grack_auth_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
Grack
::
Auth
do
describe
Grack
::
Auth
,
lib:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
...
...
spec/lib/gitlab/backend/shell_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Shell
do
describe
Gitlab
::
Shell
,
lib:
true
do
let
(
:project
)
{
double
(
'Project'
,
id:
7
,
path:
'diaspora'
)
}
let
(
:gitlab_shell
)
{
Gitlab
::
Shell
.
new
}
...
...
@@ -16,7 +16,7 @@ describe Gitlab::Shell do
it
{
expect
(
gitlab_shell
.
url_to_repo
(
'diaspora'
)).
to
eq
(
Gitlab
.
config
.
gitlab_shell
.
ssh_path_prefix
+
"diaspora.git"
)
}
describe
Gitlab
::
Shell
::
KeyAdder
do
describe
Gitlab
::
Shell
::
KeyAdder
,
lib:
true
do
describe
'#add_key'
do
it
'normalizes space characters in the key'
do
io
=
spy
...
...
spec/lib/gitlab/bitbucket_import/client_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
BitbucketImport
::
Client
do
describe
Gitlab
::
BitbucketImport
::
Client
,
lib:
true
do
let
(
:token
)
{
'123456'
}
let
(
:secret
)
{
'secret'
}
let
(
:client
)
{
Gitlab
::
BitbucketImport
::
Client
.
new
(
token
,
secret
)
}
...
...
spec/lib/gitlab/bitbucket_import/project_creator_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
BitbucketImport
::
ProjectCreator
do
describe
Gitlab
::
BitbucketImport
::
ProjectCreator
,
lib:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:repo
)
do
{
...
...
spec/lib/gitlab/closing_issue_extractor_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
ClosingIssueExtractor
do
describe
Gitlab
::
ClosingIssueExtractor
,
lib:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project2
)
{
create
(
:project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
...
...
spec/lib/gitlab/color_schemes_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
ColorSchemes
do
describe
Gitlab
::
ColorSchemes
,
lib:
true
do
describe
'.body_classes'
do
it
'returns a space-separated list of class names'
do
css
=
described_class
.
body_classes
...
...
spec/lib/gitlab/database_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Database
do
describe
Gitlab
::
Database
,
lib:
true
do
# These are just simple smoke tests to check if the methods work (regardless
# of what they may return).
describe
'.mysql?'
do
...
...
spec/lib/gitlab/diff/file_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Diff
::
File
do
describe
Gitlab
::
Diff
::
File
,
lib:
true
do
include
RepoHelpers
let
(
:project
)
{
create
(
:project
)
}
...
...
spec/lib/gitlab/diff/parser_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Diff
::
Parser
do
describe
Gitlab
::
Diff
::
Parser
,
lib:
true
do
include
RepoHelpers
let
(
:project
)
{
create
(
:project
)
}
...
...
spec/lib/gitlab/email/attachment_uploader_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
Gitlab
::
Email
::
AttachmentUploader
do
describe
Gitlab
::
Email
::
AttachmentUploader
,
lib:
true
do
describe
"#execute"
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:message_raw
)
{
fixture_file
(
"emails/attachment.eml"
)
}
...
...
spec/lib/gitlab/email/receiver_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
Gitlab
::
Email
::
Receiver
do
describe
Gitlab
::
Email
::
Receiver
,
lib:
true
do
before
do
stub_incoming_email_setting
(
enabled:
true
,
address:
"reply+%{key}@appmail.adventuretime.ooo"
)
end
...
...
spec/lib/gitlab/email/reply_parser_spec.rb
View file @
4a29669d
require
"spec_helper"
# Inspired in great part by Discourse's Email::Receiver
describe
Gitlab
::
Email
::
ReplyParser
do
describe
Gitlab
::
Email
::
ReplyParser
,
lib:
true
do
describe
'#execute'
do
def
test_parse_body
(
mail_string
)
described_class
.
new
(
Mail
::
Message
.
new
(
mail_string
)).
execute
...
...
spec/lib/gitlab/git_access_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GitAccess
do
describe
Gitlab
::
GitAccess
,
lib:
true
do
let
(
:access
)
{
Gitlab
::
GitAccess
.
new
(
actor
,
project
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/lib/gitlab/git_access_wiki_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GitAccessWiki
do
describe
Gitlab
::
GitAccessWiki
,
lib:
true
do
let
(
:access
)
{
Gitlab
::
GitAccessWiki
.
new
(
user
,
project
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/lib/gitlab/github_import/client_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GithubImport
::
Client
do
describe
Gitlab
::
GithubImport
::
Client
,
lib:
true
do
let
(
:token
)
{
'123456'
}
let
(
:client
)
{
Gitlab
::
GithubImport
::
Client
.
new
(
token
)
}
...
...
spec/lib/gitlab/github_import/project_creator_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GithubImport
::
ProjectCreator
do
describe
Gitlab
::
GithubImport
::
ProjectCreator
,
lib:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:repo
)
do
OpenStruct
.
new
(
...
...
spec/lib/gitlab/gitlab_import/client_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GitlabImport
::
Client
do
describe
Gitlab
::
GitlabImport
::
Client
,
lib:
true
do
let
(
:token
)
{
'123456'
}
let
(
:client
)
{
Gitlab
::
GitlabImport
::
Client
.
new
(
token
)
}
...
...
spec/lib/gitlab/gitlab_import/project_creator_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GitlabImport
::
ProjectCreator
do
describe
Gitlab
::
GitlabImport
::
ProjectCreator
,
lib:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:repo
)
do
{
...
...
spec/lib/gitlab/gitorious_import/project_creator_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GitoriousImport
::
ProjectCreator
do
describe
Gitlab
::
GitoriousImport
::
ProjectCreator
,
lib:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:repo
)
{
Gitlab
::
GitoriousImport
::
Repository
.
new
(
'foo/bar-baz-qux'
)
}
let
(
:namespace
){
create
(
:group
,
owner:
user
)
}
...
...
spec/lib/gitlab/google_code_import/client_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
Gitlab
::
GoogleCodeImport
::
Client
do
describe
Gitlab
::
GoogleCodeImport
::
Client
,
lib:
true
do
let
(
:raw_data
)
{
JSON
.
parse
(
fixture_file
(
"GoogleCodeProjectHosting.json"
))
}
subject
{
described_class
.
new
(
raw_data
)
}
...
...
spec/lib/gitlab/google_code_import/importer_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
Gitlab
::
GoogleCodeImport
::
Importer
do
describe
Gitlab
::
GoogleCodeImport
::
Importer
,
lib:
true
do
let
(
:mapped_user
)
{
create
(
:user
,
username:
"thilo123"
)
}
let
(
:raw_data
)
{
JSON
.
parse
(
fixture_file
(
"GoogleCodeProjectHosting.json"
))
}
let
(
:client
)
{
Gitlab
::
GoogleCodeImport
::
Client
.
new
(
raw_data
)
}
...
...
spec/lib/gitlab/google_code_import/project_creator_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
GoogleCodeImport
::
ProjectCreator
do
describe
Gitlab
::
GoogleCodeImport
::
ProjectCreator
,
lib:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:repo
)
do
Gitlab
::
GoogleCodeImport
::
Repository
.
new
(
...
...
spec/lib/gitlab/incoming_email_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
Gitlab
::
IncomingEmail
do
describe
Gitlab
::
IncomingEmail
,
lib:
true
do
describe
"self.enabled?"
do
context
"when reply by email is enabled"
do
before
do
...
...
spec/lib/gitlab/inline_diff_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
InlineDiff
do
describe
Gitlab
::
InlineDiff
,
lib:
true
do
describe
'#processing'
do
let
(
:diff
)
do
<<
eos
...
...
spec/lib/gitlab/key_fingerprint_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
Gitlab
::
KeyFingerprint
do
describe
Gitlab
::
KeyFingerprint
,
lib:
true
do
let
(
:key
)
{
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0="
}
let
(
:fingerprint
)
{
"3f:a2:ee:de:b5:de:53:c3:aa:2f:9c:45:24:4c:47:7b"
}
...
...
spec/lib/gitlab/ldap/access_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
LDAP
::
Access
do
describe
Gitlab
::
LDAP
::
Access
,
lib:
true
do
let
(
:access
)
{
Gitlab
::
LDAP
::
Access
.
new
user
}
let
(
:user
)
{
create
(
:omniauth_user
)
}
...
...
spec/lib/gitlab/ldap/adapter_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
LDAP
::
Adapter
do
describe
Gitlab
::
LDAP
::
Adapter
,
lib:
true
do
let
(
:adapter
)
{
Gitlab
::
LDAP
::
Adapter
.
new
'ldapmain'
}
describe
'#dn_matches_filter?'
do
...
...
spec/lib/gitlab/ldap/auth_hash_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
LDAP
::
AuthHash
do
describe
Gitlab
::
LDAP
::
AuthHash
,
lib:
true
do
let
(
:auth_hash
)
do
Gitlab
::
LDAP
::
AuthHash
.
new
(
OmniAuth
::
AuthHash
.
new
(
...
...
spec/lib/gitlab/ldap/authentication_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
LDAP
::
Authentication
do
describe
Gitlab
::
LDAP
::
Authentication
,
lib:
true
do
let
(
:user
)
{
create
(
:omniauth_user
,
extern_uid:
dn
)
}
let
(
:dn
)
{
'uid=john,ou=people,dc=example,dc=com'
}
let
(
:login
)
{
'john'
}
...
...
spec/lib/gitlab/ldap/config_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
LDAP
::
Config
do
describe
Gitlab
::
LDAP
::
Config
,
lib:
true
do
let
(
:config
)
{
Gitlab
::
LDAP
::
Config
.
new
provider
}
let
(
:provider
)
{
'ldapmain'
}
...
...
spec/lib/gitlab/ldap/user_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
LDAP
::
User
do
describe
Gitlab
::
LDAP
::
User
,
lib:
true
do
let
(
:ldap_user
)
{
Gitlab
::
LDAP
::
User
.
new
(
auth_hash
)
}
let
(
:gl_user
)
{
ldap_user
.
gl_user
}
let
(
:info
)
do
...
...
spec/lib/gitlab/lfs/lfs_router_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Lfs
::
Router
do
describe
Gitlab
::
Lfs
::
Router
,
lib:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:public_project
)
{
create
(
:project
,
:public
)
}
let
(
:forked_project
)
{
fork_project
(
public_project
,
user
)
}
...
...
spec/lib/gitlab/markdown/autolink_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
AutolinkFilter
do
describe
AutolinkFilter
,
lib:
true
do
include
FilterSpecHelper
let
(
:link
)
{
'http://about.gitlab.com/'
}
...
...
spec/lib/gitlab/markdown/commit_range_reference_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
CommitRangeReferenceFilter
do
describe
CommitRangeReferenceFilter
,
lib:
true
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
CommitReferenceFilter
do
describe
CommitReferenceFilter
,
lib:
true
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
spec/lib/gitlab/markdown/cross_project_reference_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
CrossProjectReference
do
describe
CrossProjectReference
,
lib:
true
do
include
described_class
describe
'#project_from_ref'
do
...
...
spec/lib/gitlab/markdown/emoji_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
EmojiFilter
do
describe
EmojiFilter
,
lib:
true
do
include
FilterSpecHelper
before
do
...
...
spec/lib/gitlab/markdown/external_issue_reference_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
ExternalIssueReferenceFilter
do
describe
ExternalIssueReferenceFilter
,
lib:
true
do
include
FilterSpecHelper
def
helper
...
...
spec/lib/gitlab/markdown/external_link_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
ExternalLinkFilter
do
describe
ExternalLinkFilter
,
lib:
true
do
include
FilterSpecHelper
it
'ignores elements without an href attribute'
do
...
...
spec/lib/gitlab/markdown/issue_reference_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
IssueReferenceFilter
do
describe
IssueReferenceFilter
,
lib:
true
do
include
FilterSpecHelper
def
helper
...
...
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
View file @
4a29669d
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
require
'html/pipeline'
module
Gitlab::Markdown
describe
LabelReferenceFilter
do
describe
LabelReferenceFilter
,
lib:
true
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
...
...
spec/lib/gitlab/markdown/merge_request_reference_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
MergeRequestReferenceFilter
do
describe
MergeRequestReferenceFilter
,
lib:
true
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:project
,
:public
)
}
...
...
spec/lib/gitlab/markdown/redactor_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
RedactorFilter
do
describe
RedactorFilter
,
lib:
true
do
include
ActionView
::
Helpers
::
UrlHelper
include
FilterSpecHelper
...
...
spec/lib/gitlab/markdown/reference_gatherer_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
ReferenceGathererFilter
do
describe
ReferenceGathererFilter
,
lib:
true
do
include
ActionView
::
Helpers
::
UrlHelper
include
FilterSpecHelper
...
...
spec/lib/gitlab/markdown/relative_link_filter_spec.rb
View file @
4a29669d
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
module
Gitlab::Markdown
describe
RelativeLinkFilter
do
describe
RelativeLinkFilter
,
lib:
true
do
def
filter
(
doc
,
contexts
=
{})
contexts
.
reverse_merge!
({
commit:
project
.
commit
,
...
...
spec/lib/gitlab/markdown/sanitization_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
SanitizationFilter
do
describe
SanitizationFilter
,
lib:
true
do
include
FilterSpecHelper
describe
'default whitelist'
do
...
...
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
SnippetReferenceFilter
do
describe
SnippetReferenceFilter
,
lib:
true
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
...
...
spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
SyntaxHighlightFilter
do
describe
SyntaxHighlightFilter
,
lib:
true
do
include
FilterSpecHelper
it
'highlights valid code blocks'
do
...
...
spec/lib/gitlab/markdown/table_of_contents_filter_spec.rb
View file @
4a29669d
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
module
Gitlab::Markdown
describe
TableOfContentsFilter
do
describe
TableOfContentsFilter
,
lib:
true
do
include
FilterSpecHelper
def
header
(
level
,
text
)
...
...
spec/lib/gitlab/markdown/task_list_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
TaskListFilter
do
describe
TaskListFilter
,
lib:
true
do
include
FilterSpecHelper
it
'does not apply `task-list` class to non-task lists'
do
...
...
spec/lib/gitlab/markdown/upload_link_filter_spec.rb
View file @
4a29669d
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
module
Gitlab::Markdown
describe
UploadLinkFilter
do
describe
UploadLinkFilter
,
lib:
true
do
def
filter
(
doc
,
contexts
=
{})
contexts
.
reverse_merge!
({
project:
project
...
...
spec/lib/gitlab/markdown/user_reference_filter_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Gitlab::Markdown
describe
UserReferenceFilter
do
describe
UserReferenceFilter
,
lib:
true
do
include
FilterSpecHelper
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
...
...
spec/lib/gitlab/markup_helper_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
MarkupHelper
do
describe
Gitlab
::
MarkupHelper
,
lib:
true
do
describe
'#markup?'
do
%w(textile rdoc org creole wiki
mediawiki rst adoc ad asciidoc mdown md markdown)
.
each
do
|
type
|
...
...
spec/lib/gitlab/note_data_builder_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
'Gitlab::NoteDataBuilder'
do
describe
'Gitlab::NoteDataBuilder'
,
lib:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:data
)
{
Gitlab
::
NoteDataBuilder
.
build
(
note
,
user
)
}
...
...
spec/lib/gitlab/o_auth/auth_hash_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
OAuth
::
AuthHash
do
describe
Gitlab
::
OAuth
::
AuthHash
,
lib:
true
do
let
(
:auth_hash
)
do
Gitlab
::
OAuth
::
AuthHash
.
new
(
OmniAuth
::
AuthHash
.
new
(
...
...
spec/lib/gitlab/o_auth/user_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
OAuth
::
User
do
describe
Gitlab
::
OAuth
::
User
,
lib:
true
do
let
(
:oauth_user
)
{
Gitlab
::
OAuth
::
User
.
new
(
auth_hash
)
}
let
(
:gl_user
)
{
oauth_user
.
gl_user
}
let
(
:uid
)
{
'my-uid'
}
...
...
spec/lib/gitlab/popen_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
'Gitlab::Popen'
,
no_db:
true
do
describe
'Gitlab::Popen'
,
lib:
true
,
no_db:
true
do
let
(
:path
)
{
Rails
.
root
.
join
(
'tmp'
).
to_s
}
before
do
...
...
spec/lib/gitlab/project_search_results_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
ProjectSearchResults
do
describe
Gitlab
::
ProjectSearchResults
,
lib:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:query
)
{
'hello world'
}
...
...
spec/lib/gitlab/push_data_builder_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
'Gitlab::PushDataBuilder'
do
describe
'Gitlab::PushDataBuilder'
,
lib:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/lib/gitlab/reference_extractor_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
ReferenceExtractor
do
describe
Gitlab
::
ReferenceExtractor
,
lib:
true
do
let
(
:project
)
{
create
(
:project
)
}
subject
{
Gitlab
::
ReferenceExtractor
.
new
(
project
,
project
.
creator
)
}
...
...
spec/lib/gitlab/regex_spec.rb
View file @
4a29669d
# coding: utf-8
require
'spec_helper'
describe
Gitlab
::
Regex
do
describe
Gitlab
::
Regex
,
lib:
true
do
describe
'project path regex'
do
it
{
expect
(
'gitlab-ce'
).
to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
it
{
expect
(
'gitlab_git'
).
to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
...
...
spec/lib/gitlab/sherlock/collection_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Sherlock
::
Collection
do
describe
Gitlab
::
Sherlock
::
Collection
,
lib:
true
do
let
(
:collection
)
{
described_class
.
new
}
let
(
:transaction
)
do
...
...
spec/lib/gitlab/sherlock/file_sample_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Sherlock
::
FileSample
do
describe
Gitlab
::
Sherlock
::
FileSample
,
lib:
true
do
let
(
:sample
)
{
described_class
.
new
(
__FILE__
,
[],
150.4
,
2
)
}
describe
'#id'
do
...
...
spec/lib/gitlab/sherlock/line_profiler_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Sherlock
::
LineProfiler
do
describe
Gitlab
::
Sherlock
::
LineProfiler
,
lib:
true
do
let
(
:profiler
)
{
described_class
.
new
}
describe
'#profile'
do
...
...
spec/lib/gitlab/sherlock/line_sample_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Sherlock
::
LineSample
do
describe
Gitlab
::
Sherlock
::
LineSample
,
lib:
true
do
let
(
:sample
)
{
described_class
.
new
(
150.0
,
4
)
}
describe
'#duration'
do
...
...
spec/lib/gitlab/sherlock/location_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Sherlock
::
Location
do
describe
Gitlab
::
Sherlock
::
Location
,
lib:
true
do
let
(
:location
)
{
described_class
.
new
(
__FILE__
,
1
)
}
describe
'from_ruby_location'
do
...
...
spec/lib/gitlab/sherlock/middleware_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Sherlock
::
Middleware
do
describe
Gitlab
::
Sherlock
::
Middleware
,
lib:
true
do
let
(
:app
)
{
double
(
:app
)
}
let
(
:middleware
)
{
described_class
.
new
(
app
)
}
...
...
spec/lib/gitlab/sherlock/query_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Sherlock
::
Query
do
describe
Gitlab
::
Sherlock
::
Query
,
lib:
true
do
let
(
:started_at
)
{
Time
.
utc
(
2015
,
1
,
1
)
}
let
(
:finished_at
)
{
started_at
+
5
}
...
...
spec/lib/gitlab/sherlock/transaction_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Sherlock
::
Transaction
do
describe
Gitlab
::
Sherlock
::
Transaction
,
lib:
true
do
let
(
:transaction
)
{
described_class
.
new
(
'POST'
,
'/cat_pictures'
)
}
describe
'#id'
do
...
...
spec/lib/gitlab/sql/union_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
SQL
::
Union
do
describe
Gitlab
::
SQL
::
Union
,
lib:
true
do
describe
'#to_sql'
do
it
'returns a String joining relations together using a UNION'
do
rel1
=
User
.
where
(
email:
'alice@example.com'
)
...
...
spec/lib/gitlab/themes_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Themes
do
describe
Gitlab
::
Themes
,
lib:
true
do
describe
'.body_classes'
do
it
'returns a space-separated list of class names'
do
css
=
described_class
.
body_classes
...
...
spec/lib/gitlab/upgrader_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
Upgrader
do
describe
Gitlab
::
Upgrader
,
lib:
true
do
let
(
:upgrader
)
{
Gitlab
::
Upgrader
.
new
}
let
(
:current_version
)
{
Gitlab
::
VERSION
}
...
...
spec/lib/gitlab/uploads_transfer_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
UploadsTransfer
do
describe
Gitlab
::
UploadsTransfer
,
lib:
true
do
before
do
@root_dir
=
File
.
join
(
Rails
.
root
,
"public"
,
"uploads"
)
@upload_transfer
=
Gitlab
::
UploadsTransfer
.
new
...
...
spec/lib/gitlab/url_builder_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Gitlab
::
UrlBuilder
do
describe
Gitlab
::
UrlBuilder
,
lib:
true
do
describe
'When asking for an issue'
do
it
'returns the issue url'
do
issue
=
create
(
:issue
)
...
...
spec/lib/gitlab/version_info_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
'Gitlab::VersionInfo'
,
no_db:
true
do
describe
'Gitlab::VersionInfo'
,
lib:
true
,
no_db:
true
do
before
do
@unknown
=
Gitlab
::
VersionInfo
.
new
@v0_0_1
=
Gitlab
::
VersionInfo
.
new
(
0
,
0
,
1
)
...
...
spec/lib/repository_cache_spec.rb
View file @
4a29669d
require_relative
'../../lib/repository_cache'
describe
RepositoryCache
do
describe
RepositoryCache
,
lib:
true
do
let
(
:backend
)
{
double
(
'backend'
).
as_null_object
}
let
(
:cache
)
{
RepositoryCache
.
new
(
'example'
,
backend
)
}
...
...
spec/models/broadcast_message_spec.rb
View file @
4a29669d
...
...
@@ -15,7 +15,7 @@
require
'spec_helper'
describe
BroadcastMessage
do
describe
BroadcastMessage
,
models:
true
do
subject
{
create
(
:broadcast_message
)
}
it
{
is_expected
.
to
be_valid
}
...
...
spec/models/build_spec.rb
View file @
4a29669d
...
...
@@ -25,7 +25,7 @@
require
'spec_helper'
describe
Ci
::
Build
do
describe
Ci
::
Build
,
models:
true
do
let
(
:project
)
{
FactoryGirl
.
create
:ci_project
}
let
(
:gl_project
)
{
FactoryGirl
.
create
:empty_project
,
gitlab_ci_project:
project
}
let
(
:commit
)
{
FactoryGirl
.
create
:ci_commit
,
gl_project:
gl_project
}
...
...
spec/models/ci/commit_spec.rb
View file @
4a29669d
...
...
@@ -18,7 +18,7 @@
require
'spec_helper'
describe
Ci
::
Commit
do
describe
Ci
::
Commit
,
models:
true
do
let
(
:project
)
{
FactoryGirl
.
create
:ci_project
}
let
(
:gl_project
)
{
FactoryGirl
.
create
:empty_project
,
gitlab_ci_project:
project
}
let
(
:commit
)
{
FactoryGirl
.
create
:ci_commit
,
gl_project:
gl_project
}
...
...
spec/models/ci/project_services/hip_chat_message_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Ci
::
HipChatMessage
do
describe
Ci
::
HipChatMessage
,
models:
true
do
subject
{
Ci
::
HipChatMessage
.
new
(
build
)
}
let
(
:commit
)
{
FactoryGirl
.
create
(
:ci_commit_with_two_jobs
)
}
...
...
spec/models/ci/project_services/hip_chat_service_spec.rb
View file @
4a29669d
...
...
@@ -15,7 +15,7 @@
require
'spec_helper'
describe
Ci
::
HipChatService
do
describe
Ci
::
HipChatService
,
models:
true
do
describe
"Validations"
do
...
...
spec/models/ci/project_services/mail_service_spec.rb
View file @
4a29669d
...
...
@@ -14,7 +14,7 @@
require
'spec_helper'
describe
Ci
::
MailService
do
describe
Ci
::
MailService
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
end
...
...
spec/models/ci/project_services/slack_message_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Ci
::
SlackMessage
do
describe
Ci
::
SlackMessage
,
models:
true
do
subject
{
Ci
::
SlackMessage
.
new
(
commit
)
}
let
(
:commit
)
{
FactoryGirl
.
create
(
:ci_commit_with_two_jobs
)
}
...
...
spec/models/ci/project_services/slack_service_spec.rb
View file @
4a29669d
...
...
@@ -14,7 +14,7 @@
require
'spec_helper'
describe
Ci
::
SlackService
do
describe
Ci
::
SlackService
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
end
...
...
spec/models/ci/project_spec.rb
View file @
4a29669d
...
...
@@ -27,7 +27,7 @@
require
'spec_helper'
describe
Ci
::
Project
do
describe
Ci
::
Project
,
models:
true
do
let
(
:project
)
{
FactoryGirl
.
create
:ci_project
}
let
(
:gl_project
)
{
project
.
gl_project
}
subject
{
project
}
...
...
spec/models/ci/runner_project_spec.rb
View file @
4a29669d
...
...
@@ -11,6 +11,6 @@
require
'spec_helper'
describe
Ci
::
RunnerProject
do
describe
Ci
::
RunnerProject
,
models:
true
do
pending
"add some examples to (or delete)
#{
__FILE__
}
"
end
spec/models/ci/runner_spec.rb
View file @
4a29669d
...
...
@@ -19,7 +19,7 @@
require
'spec_helper'
describe
Ci
::
Runner
do
describe
Ci
::
Runner
,
models:
true
do
describe
'#display_name'
do
it
'should return the description if it has a value'
do
runner
=
FactoryGirl
.
build
(
:ci_runner
,
description:
'Linux/Ruby-1.9.3-p448'
)
...
...
spec/models/ci/service_spec.rb
View file @
4a29669d
...
...
@@ -14,7 +14,7 @@
require
'spec_helper'
describe
Ci
::
Service
do
describe
Ci
::
Service
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
...
...
spec/models/ci/trigger_spec.rb
View file @
4a29669d
...
...
@@ -12,7 +12,7 @@
require
'spec_helper'
describe
Ci
::
Trigger
do
describe
Ci
::
Trigger
,
models:
true
do
let
(
:project
)
{
FactoryGirl
.
create
:ci_project
}
describe
'before_validation'
do
...
...
spec/models/ci/variable_spec.rb
View file @
4a29669d
...
...
@@ -13,7 +13,7 @@
require
'spec_helper'
describe
Ci
::
Variable
do
describe
Ci
::
Variable
,
models:
true
do
subject
{
Ci
::
Variable
.
new
}
let
(
:secret_value
)
{
'secret'
}
...
...
spec/models/ci/web_hook_spec.rb
View file @
4a29669d
...
...
@@ -11,7 +11,7 @@
require
'spec_helper'
describe
Ci
::
WebHook
do
describe
Ci
::
WebHook
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
end
...
...
spec/models/commit_range_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
CommitRange
do
describe
CommitRange
,
models:
true
do
describe
'modules'
do
subject
{
described_class
}
...
...
spec/models/commit_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Commit
do
describe
Commit
,
models:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:commit
)
{
project
.
commit
}
...
...
spec/models/commit_status_spec.rb
View file @
4a29669d
...
...
@@ -33,7 +33,7 @@
require
'spec_helper'
describe
CommitStatus
do
describe
CommitStatus
,
models:
true
do
let
(
:commit
)
{
FactoryGirl
.
create
:ci_commit
}
let
(
:commit_status
)
{
FactoryGirl
.
create
:commit_status
,
commit:
commit
}
...
...
spec/models/concerns/case_sensitivity_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
CaseSensitivity
do
describe
CaseSensitivity
,
models:
true
do
describe
'.iwhere'
do
let
(
:connection
)
{
ActiveRecord
::
Base
.
connection
}
let
(
:model
)
{
Class
.
new
{
include
CaseSensitivity
}
}
...
...
spec/models/deploy_key_spec.rb
View file @
4a29669d
...
...
@@ -15,7 +15,7 @@
require
'spec_helper'
describe
DeployKey
do
describe
DeployKey
,
models:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:deploy_key
)
{
create
(
:deploy_key
,
projects:
[
project
])
}
...
...
spec/models/deploy_keys_project_spec.rb
View file @
4a29669d
...
...
@@ -11,7 +11,7 @@
require
'spec_helper'
describe
DeployKeysProject
do
describe
DeployKeysProject
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
(
:deploy_key
)
}
it
{
is_expected
.
to
belong_to
(
:project
)
}
...
...
spec/models/event_spec.rb
View file @
4a29669d
...
...
@@ -16,7 +16,7 @@
require
'spec_helper'
describe
Event
do
describe
Event
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
belong_to
(
:target
)
}
...
...
spec/models/external_issue_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
ExternalIssue
do
describe
ExternalIssue
,
models:
true
do
let
(
:project
)
{
double
(
'project'
,
to_reference:
'namespace1/project1'
)
}
let
(
:issue
)
{
described_class
.
new
(
'EXT-1234'
,
project
)
}
...
...
spec/models/external_wiki_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
ExternalWikiService
do
describe
ExternalWikiService
,
models:
true
do
include
ExternalWikiHelper
describe
"Associations"
do
it
{
should
belong_to
:project
}
...
...
spec/models/generic_commit_status_spec.rb
View file @
4a29669d
...
...
@@ -33,7 +33,7 @@
require
'spec_helper'
describe
GenericCommitStatus
do
describe
GenericCommitStatus
,
models:
true
do
let
(
:commit
)
{
FactoryGirl
.
create
:ci_commit
}
let
(
:generic_commit_status
)
{
FactoryGirl
.
create
:generic_commit_status
,
commit:
commit
}
...
...
spec/models/global_milestone_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
GlobalMilestone
do
describe
GlobalMilestone
,
models:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
...
...
spec/models/group_spec.rb
View file @
4a29669d
...
...
@@ -16,7 +16,7 @@
require
'spec_helper'
describe
Group
do
describe
Group
,
models:
true
do
let!
(
:group
)
{
create
(
:group
)
}
describe
'associations'
do
...
...
spec/models/hooks/project_hook_spec.rb
View file @
4a29669d
...
...
@@ -18,7 +18,7 @@
require
'spec_helper'
describe
ProjectHook
do
describe
ProjectHook
,
models:
true
do
describe
'.push_hooks'
do
it
'should return hooks for push events only'
do
hook
=
create
(
:project_hook
,
push_events:
true
)
...
...
spec/models/hooks/service_hook_spec.rb
View file @
4a29669d
...
...
@@ -18,7 +18,7 @@
require
"spec_helper"
describe
ServiceHook
do
describe
ServiceHook
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:service
}
end
...
...
spec/models/hooks/system_hook_spec.rb
View file @
4a29669d
...
...
@@ -18,7 +18,7 @@
require
"spec_helper"
describe
SystemHook
do
describe
SystemHook
,
models:
true
do
describe
"execute"
do
before
(
:each
)
do
@system_hook
=
create
(
:system_hook
)
...
...
spec/models/hooks/web_hook_spec.rb
View file @
4a29669d
...
...
@@ -18,7 +18,7 @@
require
'spec_helper'
describe
ProjectHook
do
describe
ProjectHook
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
end
...
...
spec/models/issue_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
Issue
do
describe
Issue
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
(
:milestone
)
}
end
...
...
spec/models/key_spec.rb
View file @
4a29669d
...
...
@@ -15,7 +15,7 @@
require
'spec_helper'
describe
Key
do
describe
Key
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
(
:user
)
}
end
...
...
spec/models/label_link_spec.rb
View file @
4a29669d
...
...
@@ -12,7 +12,7 @@
require
'spec_helper'
describe
LabelLink
do
describe
LabelLink
,
models:
true
do
let
(
:label
)
{
create
(
:label_link
)
}
it
{
expect
(
label
).
to
be_valid
}
...
...
spec/models/label_spec.rb
View file @
4a29669d
...
...
@@ -13,7 +13,7 @@
require
'spec_helper'
describe
Label
do
describe
Label
,
models:
true
do
let
(
:label
)
{
create
(
:label
)
}
describe
'associations'
do
...
...
spec/models/member_spec.rb
View file @
4a29669d
...
...
@@ -19,7 +19,7 @@
require
'spec_helper'
describe
Member
do
describe
Member
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
(
:user
)
}
end
...
...
spec/models/members/group_member_spec.rb
View file @
4a29669d
...
...
@@ -19,7 +19,7 @@
require
'spec_helper'
describe
GroupMember
do
describe
GroupMember
,
models:
true
do
context
'notification'
do
describe
"#after_create"
do
it
"should send email to user"
do
...
...
spec/models/members/project_member_spec.rb
View file @
4a29669d
...
...
@@ -19,7 +19,7 @@
require
'spec_helper'
describe
ProjectMember
do
describe
ProjectMember
,
models:
true
do
describe
:import_team
do
before
do
@abilities
=
Six
.
new
...
...
spec/models/merge_request_spec.rb
View file @
4a29669d
...
...
@@ -25,7 +25,7 @@
require
'spec_helper'
describe
MergeRequest
do
describe
MergeRequest
,
models:
true
do
subject
{
create
(
:merge_request
)
}
describe
'associations'
do
...
...
spec/models/milestone_spec.rb
View file @
4a29669d
...
...
@@ -15,7 +15,7 @@
require
'spec_helper'
describe
Milestone
do
describe
Milestone
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
have_many
(
:issues
)
}
...
...
spec/models/namespace_spec.rb
View file @
4a29669d
...
...
@@ -16,7 +16,7 @@
require
'spec_helper'
describe
Namespace
do
describe
Namespace
,
models:
true
do
let!
(
:namespace
)
{
create
(
:namespace
)
}
it
{
is_expected
.
to
have_many
:projects
}
...
...
spec/models/note_spec.rb
View file @
4a29669d
...
...
@@ -21,7 +21,7 @@
require
'spec_helper'
describe
Note
do
describe
Note
,
models:
true
do
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
belong_to
(
:noteable
)
}
...
...
spec/models/project_security_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Project
do
describe
Project
,
models:
true
do
describe
:authorization
do
before
do
@p1
=
create
(
:project
)
...
...
spec/models/project_services/buildkite_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
BuildkiteService
do
describe
BuildkiteService
,
models:
true
do
describe
'Associations'
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_services/drone_ci_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
DroneCiService
do
describe
DroneCiService
,
models:
true
do
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
have_one
(
:service_hook
)
}
...
...
spec/models/project_services/flowdock_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
FlowdockService
do
describe
FlowdockService
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_services/gemnasium_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
GemnasiumService
do
describe
GemnasiumService
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_services/gitlab_ci_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
GitlabCiService
do
describe
GitlabCiService
,
models:
true
do
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
have_one
(
:service_hook
)
}
...
...
spec/models/project_services/gitlab_issue_tracker_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
GitlabIssueTrackerService
do
describe
GitlabIssueTrackerService
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_services/hipchat_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
HipchatService
do
describe
HipchatService
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_services/irker_service_spec.rb
View file @
4a29669d
...
...
@@ -22,7 +22,7 @@ require 'spec_helper'
require
'socket'
require
'json'
describe
IrkerService
do
describe
IrkerService
,
models:
true
do
describe
'Associations'
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_services/jira_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
JiraService
do
describe
JiraService
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_services/pushover_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
PushoverService
do
describe
PushoverService
,
models:
true
do
describe
'Associations'
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_services/slack_service/issue_message_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
SlackService
::
IssueMessage
do
describe
SlackService
::
IssueMessage
,
models:
true
do
subject
{
SlackService
::
IssueMessage
.
new
(
args
)
}
let
(
:args
)
do
...
...
spec/models/project_services/slack_service/merge_message_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
SlackService
::
MergeMessage
do
describe
SlackService
::
MergeMessage
,
models:
true
do
subject
{
SlackService
::
MergeMessage
.
new
(
args
)
}
let
(
:args
)
do
...
...
spec/models/project_services/slack_service/note_message_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
SlackService
::
NoteMessage
do
describe
SlackService
::
NoteMessage
,
models:
true
do
let
(
:color
)
{
'#345'
}
before
do
...
...
spec/models/project_services/slack_service/push_message_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
SlackService
::
PushMessage
do
describe
SlackService
::
PushMessage
,
models:
true
do
subject
{
SlackService
::
PushMessage
.
new
(
args
)
}
let
(
:args
)
do
...
...
spec/models/project_services/slack_service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
SlackService
do
describe
SlackService
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
spec/models/project_snippet_spec.rb
View file @
4a29669d
...
...
@@ -17,7 +17,7 @@
require
'spec_helper'
describe
ProjectSnippet
do
describe
ProjectSnippet
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
end
...
...
spec/models/project_spec.rb
View file @
4a29669d
...
...
@@ -33,7 +33,7 @@
require
'spec_helper'
describe
Project
do
describe
Project
,
models:
true
do
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
:group
)
}
it
{
is_expected
.
to
belong_to
(
:namespace
)
}
...
...
spec/models/project_team_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
ProjectTeam
do
describe
ProjectTeam
,
models:
true
do
let
(
:master
)
{
create
(
:user
)
}
let
(
:reporter
)
{
create
(
:user
)
}
let
(
:guest
)
{
create
(
:user
)
}
...
...
spec/models/project_wiki_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
ProjectWiki
do
describe
ProjectWiki
,
models:
true
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:repository
)
{
project
.
repository
}
let
(
:user
)
{
project
.
owner
}
...
...
spec/models/protected_branch_spec.rb
View file @
4a29669d
...
...
@@ -12,7 +12,7 @@
require
'spec_helper'
describe
ProtectedBranch
do
describe
ProtectedBranch
,
models:
true
do
describe
'Associations'
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
end
...
...
spec/models/repository_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Repository
do
describe
Repository
,
models:
true
do
include
RepoHelpers
let
(
:repository
)
{
create
(
:project
).
repository
}
...
...
spec/models/service_spec.rb
View file @
4a29669d
...
...
@@ -20,7 +20,7 @@
require
'spec_helper'
describe
Service
do
describe
Service
,
models:
true
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
...
...
spec/models/snippet_spec.rb
View file @
4a29669d
...
...
@@ -17,7 +17,7 @@
require
'spec_helper'
describe
Snippet
do
describe
Snippet
,
models:
true
do
describe
'modules'
do
subject
{
described_class
}
...
...
spec/models/user_spec.rb
View file @
4a29669d
...
...
@@ -61,7 +61,7 @@
require
'spec_helper'
describe
User
do
describe
User
,
models:
true
do
include
Gitlab
::
CurrentSettings
describe
'modules'
do
...
...
spec/models/wiki_page_spec.rb
View file @
4a29669d
require
"spec_helper"
describe
WikiPage
do
describe
WikiPage
,
models:
true
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:wiki
)
{
ProjectWiki
.
new
(
project
,
user
)
}
...
...
spec/services/archive_repository_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
ArchiveRepositoryService
do
describe
ArchiveRepositoryService
,
services:
true
do
let
(
:project
)
{
create
(
:project
)
}
subject
{
ArchiveRepositoryService
.
new
(
project
,
"master"
,
"zip"
)
}
...
...
spec/services/ci/create_commit_service_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Ci
describe
CreateCommitService
do
describe
CreateCommitService
,
services:
true
do
let
(
:service
)
{
CreateCommitService
.
new
}
let
(
:project
)
{
FactoryGirl
.
create
(
:ci_project
)
}
let
(
:user
)
{
nil
}
...
...
spec/services/ci/create_trigger_request_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Ci
::
CreateTriggerRequestService
do
describe
Ci
::
CreateTriggerRequestService
,
services:
true
do
let
(
:service
)
{
Ci
::
CreateTriggerRequestService
.
new
}
let
(
:gl_project
)
{
create
(
:project
)
}
let
(
:project
)
{
gl_project
.
ensure_gitlab_ci_project
}
...
...
spec/services/ci/event_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Ci
::
EventService
do
describe
Ci
::
EventService
,
services:
true
do
let
(
:project
)
{
FactoryGirl
.
create
:ci_project
}
let
(
:user
)
{
double
(
username:
"root"
,
id:
1
)
}
...
...
spec/services/ci/image_for_build_service_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Ci
describe
ImageForBuildService
do
describe
ImageForBuildService
,
services:
true
do
let
(
:service
)
{
ImageForBuildService
.
new
}
let
(
:project
)
{
FactoryGirl
.
create
(
:ci_project
)
}
let
(
:gl_project
)
{
FactoryGirl
.
create
(
:project
,
gitlab_ci_project:
project
)
}
...
...
spec/services/ci/register_build_service_spec.rb
View file @
4a29669d
require
'spec_helper'
module
Ci
describe
RegisterBuildService
do
describe
RegisterBuildService
,
services:
true
do
let!
(
:service
)
{
RegisterBuildService
.
new
}
let!
(
:gl_project
)
{
FactoryGirl
.
create
:empty_project
}
let!
(
:commit
)
{
FactoryGirl
.
create
:ci_commit
,
gl_project:
gl_project
}
...
...
spec/services/ci/web_hook_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Ci
::
WebHookService
do
describe
Ci
::
WebHookService
,
services:
true
do
let
(
:project
)
{
FactoryGirl
.
create
:ci_project
}
let
(
:gl_project
)
{
FactoryGirl
.
create
:empty_project
,
gitlab_ci_project:
project
}
let
(
:commit
)
{
FactoryGirl
.
create
:ci_commit
,
gl_project:
gl_project
}
...
...
spec/services/create_release_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
CreateReleaseService
do
describe
CreateReleaseService
,
services:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:tag_name
)
{
project
.
repository
.
tag_names
.
first
}
...
...
spec/services/create_snippet_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
CreateSnippetService
do
describe
CreateSnippetService
,
services:
true
do
before
do
@user
=
create
:user
@admin
=
create
:user
,
admin:
true
...
...
spec/services/destroy_group_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
DestroyGroupService
do
describe
DestroyGroupService
,
services:
true
do
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
...
...
spec/services/event_create_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
EventCreateService
do
describe
EventCreateService
,
services:
true
do
let
(
:service
)
{
EventCreateService
.
new
}
describe
'Issues'
do
...
...
spec/services/git_hooks_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
GitHooksService
do
describe
GitHooksService
,
services:
true
do
include
RepoHelpers
let
(
:user
)
{
create
:user
}
...
...
spec/services/git_push_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
GitPushService
do
describe
GitPushService
,
services:
true
do
include
RepoHelpers
let
(
:user
)
{
create
:user
}
...
...
spec/services/git_tag_push_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
GitTagPushService
do
describe
GitTagPushService
,
services:
true
do
include
RepoHelpers
let
(
:user
)
{
create
:user
}
...
...
spec/services/issues/bulk_update_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Issues
::
BulkUpdateService
do
describe
Issues
::
BulkUpdateService
,
services:
true
do
let
(
:issue
)
{
create
(
:issue
,
project:
@project
)
}
before
do
...
...
spec/services/issues/close_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Issues
::
CloseService
do
describe
Issues
::
CloseService
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
assignee:
user2
)
}
...
...
spec/services/issues/create_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Issues
::
CreateService
do
describe
Issues
::
CreateService
,
services:
true
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/services/issues/update_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Issues
::
UpdateService
do
describe
Issues
::
UpdateService
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user3
)
{
create
(
:user
)
}
...
...
spec/services/merge_requests/close_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
MergeRequests
::
CloseService
do
describe
MergeRequests
::
CloseService
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
assignee:
user2
)
}
...
...
spec/services/merge_requests/create_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
MergeRequests
::
CreateService
do
describe
MergeRequests
::
CreateService
,
services:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/services/merge_requests/merge_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
MergeRequests
::
MergeService
do
describe
MergeRequests
::
MergeService
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
assignee:
user2
)
}
...
...
spec/services/merge_requests/refresh_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
MergeRequests
::
RefreshService
do
describe
MergeRequests
::
RefreshService
,
services:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:service
)
{
MergeRequests
::
RefreshService
}
...
...
spec/services/merge_requests/reopen_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
MergeRequests
::
ReopenService
do
describe
MergeRequests
::
ReopenService
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
assignee:
user2
)
}
...
...
spec/services/merge_requests/update_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
MergeRequests
::
UpdateService
do
describe
MergeRequests
::
UpdateService
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user3
)
{
create
(
:user
)
}
...
...
spec/services/milestones/close_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Milestones
::
CloseService
do
describe
Milestones
::
CloseService
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:milestone
)
{
create
(
:milestone
,
title:
"Milestone v1.2"
,
project:
project
)
}
...
...
spec/services/milestones/create_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Milestones
::
CreateService
do
describe
Milestones
::
CreateService
,
services:
true
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/services/notes/create_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Notes
::
CreateService
do
describe
Notes
::
CreateService
,
services:
true
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/services/notification_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
NotificationService
do
describe
NotificationService
,
services:
true
do
let
(
:notification
)
{
NotificationService
.
new
}
around
(
:each
)
do
|
example
|
...
...
spec/services/projects/create_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Projects
::
CreateService
do
describe
Projects
::
CreateService
,
services:
true
do
describe
:create_by_user
do
before
do
@user
=
create
:user
...
...
spec/services/projects/destroy_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Projects
::
DestroyService
do
describe
Projects
::
DestroyService
,
services:
true
do
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let!
(
:path
)
{
project
.
repository
.
path_to_repo
}
...
...
spec/services/projects/download_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Projects
::
DownloadService
do
describe
Projects
::
DownloadService
,
services:
true
do
describe
'File service'
do
before
do
@user
=
create
:user
...
...
spec/services/projects/fork_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Projects
::
ForkService
do
describe
Projects
::
ForkService
,
services:
true
do
describe
:fork_by_user
do
before
do
@from_namespace
=
create
(
:namespace
)
...
...
spec/services/projects/transfer_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Projects
::
TransferService
do
describe
Projects
::
TransferService
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
...
...
spec/services/projects/update_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Projects
::
UpdateService
do
describe
Projects
::
UpdateService
,
services:
true
do
describe
:update_by_user
do
before
do
@user
=
create
:user
...
...
spec/services/projects/upload_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
Projects
::
UploadService
do
describe
Projects
::
UploadService
,
services:
true
do
describe
'File service'
do
before
do
@user
=
create
:user
...
...
spec/services/search_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
'Search::GlobalService'
do
describe
'Search::GlobalService'
,
services:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:public_user
)
{
create
(
:user
)
}
let
(
:internal_user
)
{
create
(
:user
)
}
...
...
spec/services/system_hooks_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
SystemHooksService
do
describe
SystemHooksService
,
services:
true
do
let
(
:user
)
{
create
:user
}
let
(
:project
)
{
create
:project
}
let
(
:project_member
)
{
create
:project_member
}
...
...
spec/services/system_note_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
SystemNoteService
do
describe
SystemNoteService
,
services:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:author
)
{
create
(
:user
)
}
let
(
:noteable
)
{
create
(
:issue
,
project:
project
)
}
...
...
spec/services/test_hook_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
TestHookService
do
describe
TestHookService
,
services:
true
do
let
(
:user
)
{
create
:user
}
let
(
:project
)
{
create
:project
}
let
(
:hook
)
{
create
:project_hook
,
project:
project
}
...
...
spec/services/update_release_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
UpdateReleaseService
do
describe
UpdateReleaseService
,
services:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:tag_name
)
{
project
.
repository
.
tag_names
.
first
}
...
...
spec/services/update_snippet_service_spec.rb
View file @
4a29669d
require
'spec_helper'
describe
UpdateSnippetService
do
describe
UpdateSnippetService
,
services:
true
do
before
do
@user
=
create
:user
@admin
=
create
:user
,
admin:
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment