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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
cd45fd70
Commit
cd45fd70
authored
Aug 11, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test basic email flow
parent
13b423ce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
48 deletions
+23
-48
app/views/admin/emails/show.html.haml
app/views/admin/emails/show.html.haml
+1
-1
features/admin/emails.feature
features/admin/emails.feature
+3
-3
features/steps/admin/email.rb
features/steps/admin/email.rb
+12
-44
features/steps/shared/admin.rb
features/steps/shared/admin.rb
+7
-0
No files found.
app/views/admin/emails/show.html.haml
View file @
cd45fd70
...
...
@@ -3,7 +3,7 @@
%p
.light
You can notify the app / group or a project by sending them an email notification
=
form_tag
admin_email_path
,
class:
'form-horizontal'
do
=
form_tag
admin_email_path
,
class:
'form-horizontal'
,
id:
'new-admin-email'
do
.form-group
%label
.control-label
{
for: :subject
}
Subject
.col-sm-10
...
...
features/admin/emails.feature
View file @
cd45fd70
...
...
@@ -2,9 +2,9 @@
Feature
:
Admin email
Background
:
Given
I sign in as an admin
And
I visit admin email page
And
there are groups with projects
Scenario
:
Create a new email notification
When
I click new email notification
And
submit form with email notification info
Given
I visit admin email page
When
I
submit form with email notification info
Then
I should see a notification email is begin send
features/steps/admin/email.rb
View file @
cd45fd70
class
Spinach::Features::AdminEmail
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedAdmin
step
'I see all previous email notifications'
do
pending
'step not implemented'
step
'I submit form with email notification info'
do
@email_text
=
"I've moved the project"
@selected_project
=
Group
.
last
.
projects
.
first
within
(
'form#new-admin-email'
)
do
fill_in
:subject
,
with:
'my subject'
fill_in
:body
,
with:
@email_text
select
"
#{
@selected_project
.
group
.
name
}
/
#{
@selected_project
.
name
}
"
,
from: :recipients
find
(
'.btn-create'
).
click
end
end
step
'I click new email notification'
do
pending
'step not implemented'
end
step
'submit form with email notification info'
do
pending
'step not implemented'
end
step
'I should be redirected to the email notification page'
do
pending
'step not implemented'
end
step
'I should see newly created email notification'
do
pending
'step not implemented'
end
step
'email notification \'maintenance\''
do
pending
'step not implemented'
end
step
'I visit email notification \'maintenance\''
do
pending
'step not implemented'
end
step
'I submit recipients'
do
pending
'step not implemented'
end
step
'I should see the reciepints'
do
pending
'step not implemented'
end
step
'email notification \'maintenance\' with selected recipients'
do
pending
'step not implemented'
end
step
'I click send'
do
pending
'step not implemented'
end
step
'I should see the notification has been sent'
do
pending
'step not implemented'
step
'I should see a notification email is begin send'
do
expect
(
find
(
'.flash-notice'
)).
to
have_content
'Email send'
end
end
\ No newline at end of file
features/steps/shared/admin.rb
View file @
cd45fd70
...
...
@@ -8,5 +8,12 @@ module SharedAdmin
And
'system has users'
do
2
.
times
{
create
(
:user
)
}
end
And
'there are groups with projects'
do
2
.
times
do
group
=
create
:group
create
:project
,
group:
group
end
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