BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
62079d76
Commit
62079d76
authored
Jun 09, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add init test for ProjectSearchResults
See:
https://github.com/gitlabhq/gitlabhq/pull/9368#issuecomment-110350335
parent
0e615a48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
project_search_results_spec.rb
spec/lib/gitlab/project_search_results_spec.rb
+23
-0
No files found.
spec/lib/gitlab/project_search_results_spec.rb
0 → 100644
View file @
62079d76
require
'spec_helper'
describe
Gitlab
::
ProjectSearchResults
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:query
)
{
'hello world'
}
describe
'initialize with empty ref'
do
let
(
:results
)
{
Gitlab
::
ProjectSearchResults
.
new
(
project
.
id
,
query
,
''
)
}
it
{
expect
(
results
.
project
).
to
eq
(
project
)
}
it
{
expect
(
results
.
repository_ref
).
to
be_nil
}
it
{
expect
(
results
.
query
).
to
eq
(
'hello\\ world'
)
}
end
describe
'initialize with ref'
do
let
(
:ref
)
{
'refs/heads/test'
}
let
(
:results
)
{
Gitlab
::
ProjectSearchResults
.
new
(
project
.
id
,
query
,
ref
)
}
it
{
expect
(
results
.
project
).
to
eq
(
project
)
}
it
{
expect
(
results
.
repository_ref
).
to
eq
(
ref
)
}
it
{
expect
(
results
.
query
).
to
eq
(
'hello\\ world'
)
}
end
end
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