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
Boxiang Sun
gitlab-ce
Commits
13d6bab1
Commit
13d6bab1
authored
Dec 09, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tag lib specs
parent
7a5e77c0
Changes
85
Hide whitespace changes
Inline
Side-by-side
Showing
85 changed files
with
86 additions
and
86 deletions
+86
-86
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
No files found.
spec/lib/ci/ansi2html_spec.rb
View file @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
...
...
@@ -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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
...
...
@@ -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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
...
...
@@ -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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
...
...
@@ -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 @
13d6bab1
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 @
13d6bab1
...
...
@@ -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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
# 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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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 @
13d6bab1
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
)
}
...
...
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