Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-12 20:56:48 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-12 20:56:48 +0400
commit3397361fd7aeec711167c40b3fbab1e05a53b73d (patch)
treefe8973b486d73c48f8edefa2d6a040c8d2aa0390 /features/steps/admin
parent13a66040300241caf234726bfc72ca90ef4c34fd (diff)
Spinach test for broadcast messages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features/steps/admin')
-rw-r--r--features/steps/admin/admin_broadcast_messages.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/features/steps/admin/admin_broadcast_messages.rb b/features/steps/admin/admin_broadcast_messages.rb
new file mode 100644
index 00000000000..4dfaac06ae4
--- /dev/null
+++ b/features/steps/admin/admin_broadcast_messages.rb
@@ -0,0 +1,27 @@
+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