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
5e12f10c
Commit
5e12f10c
authored
Nov 01, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
82d16ccf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
41 deletions
+81
-41
app/views/layouts/_head_panel.html.erb
app/views/layouts/_head_panel.html.erb
+4
-2
app/views/layouts/devise.html.haml
app/views/layouts/devise.html.haml
+1
-2
spec/requests/issues_spec.rb
spec/requests/issues_spec.rb
+69
-30
spec/requests/projects_spec.rb
spec/requests/projects_spec.rb
+2
-2
spec/support/login.rb
spec/support/login.rb
+4
-4
vendor/assets/stylesheets/jquery-ui/jquery-ui.css
vendor/assets/stylesheets/jquery-ui/jquery-ui.css
+1
-1
No files found.
app/views/layouts/_head_panel.html.erb
View file @
5e12f10c
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
<%
end
%>
<%
end
%>
<%=
link_to
'Logout'
,
destroy_user_session_path
,
:class
=>
"logout"
,
:method
=>
:delete
%>
<%=
link_to
'Logout'
,
destroy_user_session_path
,
:class
=>
"logout"
,
:method
=>
:delete
%>
</div>
</div>
<div
class=
"search"
>
<%=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
%>
</div>
<!-- .login-top -->
<!-- .login-top -->
<nav>
<nav>
<%=
link_to
root_path
,
:class
=>
current_page?
(
root_path
)
?
"current dashboard"
:
"dashboard"
do
%>
<%=
link_to
root_path
,
:class
=>
current_page?
(
root_path
)
?
"current dashboard"
:
"dashboard"
do
%>
...
@@ -31,7 +34,6 @@
...
@@ -31,7 +34,6 @@
<div
class=
"span-24"
>
<div
class=
"span-24"
>
<div
class=
"span-10"
>
<div
class=
"span-10"
>
<span
class=
"search-holder"
>
<span
class=
"search-holder"
>
<%=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
%>
</span>
</span>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
...
...
app/views/layouts/devise.html.haml
View file @
5e12f10c
...
@@ -11,6 +11,5 @@
...
@@ -11,6 +11,5 @@
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
%body
.login-page
%body
.login-page
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/flash"
=
yield
=
yield
spec/requests/issues_spec.rb
View file @
5e12f10c
...
@@ -5,7 +5,10 @@ describe "Issues" do
...
@@ -5,7 +5,10 @@ describe "Issues" do
before
do
before
do
login_as
:user
login_as
:user
@user2
=
Factory
:user
project
.
add_access
(
@user
,
:read
,
:write
)
project
.
add_access
(
@user
,
:read
,
:write
)
project
.
add_access
(
@user2
,
:read
,
:write
)
end
end
describe
"GET /issues"
do
describe
"GET /issues"
do
...
@@ -49,20 +52,20 @@ describe "Issues" do
...
@@ -49,20 +52,20 @@ describe "Issues" do
end
end
it
"should show only open"
do
it
"should show only open"
do
should
have_content
(
@issue
.
title
)
should
have_content
(
@issue
.
title
[
0
..
25
]
)
should
have_no_content
(
@closed_issue
.
title
)
should
have_no_content
(
@closed_issue
.
title
)
end
end
it
"should show only closed"
do
it
"should show only closed"
do
choose
"closed_issues"
choose
"closed_issues"
should
have_no_content
(
@issue
.
title
)
should
have_no_content
(
@issue
.
title
)
should
have_content
(
@closed_issue
.
title
)
should
have_content
(
@closed_issue
.
title
[
0
..
25
]
)
end
end
it
"should show all"
do
it
"should show all"
do
choose
"all_issues"
choose
"all_issues"
should
have_content
(
@issue
.
title
)
should
have_content
(
@issue
.
title
[
0
..
25
]
)
should
have_content
(
@closed_issue
.
title
)
should
have_content
(
@closed_issue
.
title
[
0
..
25
]
)
end
end
end
end
end
end
...
@@ -78,11 +81,14 @@ describe "Issues" do
...
@@ -78,11 +81,14 @@ describe "Issues" do
end
end
describe
"fill in"
do
describe
"fill in"
do
describe
'assign to me'
do
before
do
before
do
fill_in
"issue_title"
,
:with
=>
"bug 345"
fill_in
"issue_title"
,
:with
=>
"bug 345"
click_link
"Select user"
click_link
"Select user"
within
"#issue_assignee_id-menu"
do
click_link
@user
.
name
click_link
@user
.
name
end
end
end
it
{
expect
{
click_button
"Save"
}.
to
change
{
Issue
.
count
}.
by
(
1
)
}
it
{
expect
{
click_button
"Save"
}.
to
change
{
Issue
.
count
}.
by
(
1
)
}
...
@@ -95,6 +101,37 @@ describe "Issues" do
...
@@ -95,6 +101,37 @@ describe "Issues" do
page
.
should
have_content
project
.
name
page
.
should
have_content
project
.
name
end
end
it
"should call send mail"
do
Notify
.
should_not_receive
(
:new_issue_email
)
click_button
"Save"
end
it
"should send valid email to user with email & password"
do
click_button
"Save"
ActionMailer
::
Base
.
deliveries
.
last
.
should
be_nil
end
end
describe
'assign to other'
do
before
do
fill_in
"issue_title"
,
:with
=>
"bug 345"
click_link
"Select user"
within
"#issue_assignee_id-menu"
do
click_link
@user2
.
name
end
end
it
{
expect
{
click_button
"Save"
}.
to
change
{
Issue
.
count
}.
by
(
1
)
}
it
"should add new issue to table"
do
click_button
"Save"
page
.
should_not
have_content
(
"Add new issue"
)
page
.
should
have_content
@user2
.
name
page
.
should
have_content
"bug 345"
page
.
should
have_content
project
.
name
end
it
"should call send mail"
do
it
"should call send mail"
do
Notify
.
should_receive
(
:new_issue_email
).
and_return
(
stub
(
:deliver
=>
true
))
Notify
.
should_receive
(
:new_issue_email
).
and_return
(
stub
(
:deliver
=>
true
))
click_button
"Save"
click_button
"Save"
...
@@ -108,6 +145,8 @@ describe "Issues" do
...
@@ -108,6 +145,8 @@ describe "Issues" do
email
.
body
.
should
have_content
(
issue
.
title
)
email
.
body
.
should
have_content
(
issue
.
title
)
email
.
body
.
should
have_content
(
issue
.
assignee
.
name
)
email
.
body
.
should
have_content
(
issue
.
assignee
.
name
)
end
end
end
end
end
end
end
...
...
spec/requests/projects_spec.rb
View file @
5e12f10c
...
@@ -13,14 +13,14 @@ describe "Projects" do
...
@@ -13,14 +13,14 @@ describe "Projects" do
end
end
it
"should have link to new project"
do
it
"should have link to new project"
do
page
.
should
have_content
(
"
New P
roject"
)
page
.
should
have_content
(
"
Create new p
roject"
)
end
end
end
end
describe
"GET /projects/new"
do
describe
"GET /projects/new"
do
before
do
before
do
visit
projects_path
visit
projects_path
click_link
"
New P
roject"
click_link
"
Create new p
roject"
end
end
it
"should be correct path"
do
it
"should be correct path"
do
...
...
spec/support/login.rb
View file @
5e12f10c
...
@@ -12,15 +12,15 @@ module LoginMacros
...
@@ -12,15 +12,15 @@ module LoginMacros
end
end
visit
new_user_session_path
visit
new_user_session_path
fill_in
"
E
mail"
,
:with
=>
@user
.
email
fill_in
"
user_e
mail"
,
:with
=>
@user
.
email
fill_in
"
P
assword"
,
:with
=>
"123456"
fill_in
"
user_p
assword"
,
:with
=>
"123456"
click_button
"Sign in"
click_button
"Sign in"
end
end
def
login_with
(
user
)
def
login_with
(
user
)
visit
new_user_session_path
visit
new_user_session_path
fill_in
"
E
mail"
,
:with
=>
user
.
email
fill_in
"
user_e
mail"
,
:with
=>
user
.
email
fill_in
"
P
assword"
,
:with
=>
"123456"
fill_in
"
user_p
assword"
,
:with
=>
"123456"
click_button
"Sign in"
click_button
"Sign in"
end
end
...
...
vendor/assets/stylesheets/jquery-ui/jquery-ui.css
View file @
5e12f10c
...
@@ -445,7 +445,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
...
@@ -445,7 +445,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
* http://docs.jquery.com/UI/Dialog#theming
* http://docs.jquery.com/UI/Dialog#theming
*/
*/
.ui-dialog
{
position
:
absolute
;
padding
:
0
;
width
:
300px
;
overflow
:
hidden
;
}
.ui-dialog
{
position
:
absolute
;
padding
:
0
;
width
:
300px
;
overflow
:
hidden
;
}
.ui-dialog
.ui-dialog-titlebar
{
padding
:
.4em
1em
;
position
:
relative
;
background
:
#
333
;
color
:
#eaeaea
}
.ui-dialog
.ui-dialog-titlebar
{
padding
:
.4em
1em
;
position
:
relative
;
background
:
#
F7F7F7
;
color
:
#555
;
}
.ui-dialog
.ui-dialog-title
{
float
:
left
;
margin
:
.1em
16px
.1em
0
;}
.ui-dialog
.ui-dialog-title
{
float
:
left
;
margin
:
.1em
16px
.1em
0
;}
.ui-dialog
.ui-dialog-titlebar-close
{
position
:
absolute
;
right
:
.3em
;
top
:
50%
;
width
:
19px
;
margin
:
-10px
0
0
0
;
padding
:
1px
;
height
:
18px
;
background
:
#eaeaea
}
.ui-dialog
.ui-dialog-titlebar-close
{
position
:
absolute
;
right
:
.3em
;
top
:
50%
;
width
:
19px
;
margin
:
-10px
0
0
0
;
padding
:
1px
;
height
:
18px
;
background
:
#eaeaea
}
.ui-dialog
.ui-dialog-titlebar-close
span
{
display
:
block
;
margin
:
1px
;
}
.ui-dialog
.ui-dialog-titlebar-close
span
{
display
:
block
;
margin
:
1px
;
}
...
...
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