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
Tatuya Kamada
gitlab-ce
Commits
3397361f
Commit
3397361f
authored
Nov 12, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spinach test for broadcast messages
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
13a66040
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
features/admin/broadcast_messages.feature
features/admin/broadcast_messages.feature
+13
-0
features/steps/admin/admin_broadcast_messages.rb
features/steps/admin/admin_broadcast_messages.rb
+27
-0
No files found.
features/admin/broadcast_messages.feature
0 → 100644
View file @
3397361f
Feature
:
Admin Broadcast Messages
Background
:
Given
I sign in as an admin
And
application already has admin messages
And
I visit admin messages page
Scenario
:
See broadcast messages list
Then
I should be all broadcast messages
Scenario
:
Create a broadcast message
When
submit form with new broadcast message
Then
I should be redirected to admin messages page
And
I should see newly created broadcast message
features/steps/admin/admin_broadcast_messages.rb
0 → 100644
View file @
3397361f
class
Spinach::Features::AdminBroadcastMessages
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedAdmin
step
'application already has admin messages'
do
FactoryGirl
.
create
(
:broadcast_message
,
message:
"Migration to new server"
)
end
step
'I should be all broadcast messages'
do
page
.
should
have_content
"Migration to new server"
end
step
'submit form with new broadcast message'
do
fill_in
'broadcast_message_message'
,
with:
'Application update from 4:00 CST to 5:00 CST'
select
'2018'
,
from:
"broadcast_message_ends_at_1i"
click_button
"Add broadcast message"
end
step
'I should be redirected to admin messages page'
do
current_path
.
should
==
admin_broadcast_messages_path
end
step
'I should see newly created broadcast message'
do
page
.
should
have_content
'Application update from 4:00 CST to 5:00 CST'
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