mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 21:10:54 +00:00
26 lines
No EOL
621 B
Ruby
26 lines
No EOL
621 B
Ruby
require 'spec_helper'
|
|
|
|
feature 'Shoutbox' do
|
|
background do
|
|
@user = create :user
|
|
sign_in_as @user
|
|
visit root_path
|
|
end
|
|
|
|
feature 'user creates a shout', js: true do
|
|
scenario 'shouting with valid content' do
|
|
shout = rand(100000).to_s
|
|
fill_in 'shoutbox_text', with: shout
|
|
click_button 'Shout!'
|
|
expect(page).to have_content(shout)
|
|
end
|
|
|
|
scenario 'unable to while banned' do
|
|
@user.bans.create! ban_type: Ban::TYPE_MUTE, expiry: Time.now + 10.days
|
|
shout = rand(100000).to_s
|
|
fill_in 'shoutbox_text', with: shout
|
|
click_button 'Shout!'
|
|
expect(page).to_not have_content(shout)
|
|
end
|
|
end
|
|
end |