Открыть боковую панель
nt_test133
nt_project_uxpg8lvcuq8w
Коммиты
e918493f
Коммит
e918493f
создал
Янв 14, 2016
по автору
Rémy Coutable
Просмотр файлов
Fix specs and rubocop warnings
владелец
33ea09bd
Изменения
3
Скрыть пробелы
Построчно
Рядом
features/steps/shared/project.rb
Просмотр файла @
e918493f
...
...
@@ -224,7 +224,7 @@ def current_project
end
def
user_owns_project
(
user_name
:,
project_name
:,
visibility: :private
)
user
=
user_exists
(
user_name
,
username:
user_name
.
underscore
)
user
=
user_exists
(
user_name
,
username:
user_name
.
gsub
(
/\s/
,
''
).
underscore
)
project
=
Project
.
find_by
(
name:
project_name
)
project
||=
create
(
:empty_project
,
visibility
,
name:
project_name
,
namespace:
user
.
namespace
)
project
.
team
<<
[
user
,
:master
]
...
...
spec/models/note_spec.rb
Просмотр файла @
e918493f
...
...
@@ -186,12 +186,12 @@
let
(
:ext_proj
)
{
create
(
:project
,
:public
)
}
let
(
:ext_issue
)
{
create
(
:issue
,
project:
ext_proj
)
}
let
(
:note
)
{
let
(
:note
)
do
create
:note
,
noteable:
ext_issue
,
project:
ext_proj
,
note:
"mentioned in issue
#{
private_issue
.
to_reference
(
ext_proj
)
}
"
,
system:
true
}
end
it
"returns true"
do
expect
(
note
.
cross_reference_not_visible_for?
(
ext_issue
.
author
)).
to
be_truthy
...
...
spec/requests/api/notes_spec.rb
Просмотр файла @
e918493f
...
...
@@ -13,20 +13,21 @@
# For testing the cross-reference of a private issue in a public issue
let
(
:private_user
)
{
create
(
:user
)
}
let
(
:private_project
)
{
let
(
:private_project
)
do
create
(
:project
,
namespace:
private_user
.
namespace
).
tap
{
|
p
|
p
.
team
<<
[
private_user
,
:master
]
}
}
let
(
:private_issue
)
{
create
(
:issue
,
project:
private_project
)
}
end
let
(
:private_issue
)
{
create
(
:issue
,
project:
private_project
)
}
let
(
:ext_proj
)
{
create
(
:project
,
:public
)
}
let
(
:ext_issue
)
{
create
(
:issue
,
project:
ext_proj
)
}
let!
(
:cross_reference_note
)
{
let!
(
:cross_reference_note
)
do
create
:note
,
noteable:
ext_issue
,
project:
ext_proj
,
note:
"mentioned in issue
#{
private_issue
.
to_reference
(
ext_proj
)
}
"
,
system:
true
}
end
before
{
project
.
team
<<
[
user
,
:reporter
]
}
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать