File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 4545 expect ( page ) . to have_css ( 'ul.pagination' )
4646 end
4747
48- context 'when reporting is enabled' do
49- let ( :report_emails ) { [ '[email protected] ' ] } 48+ describe 'reporting of user content' do
49+ before do
50+ visit ( request_for_comment_path ( create ( :rfc ) ) )
51+ end
52+
53+ context 'when reporting is enabled' do
54+ let ( :report_emails ) { [ '[email protected] ' ] } 5055
51- it 'allows reporting of RfCs' , :js do
52- request_for_comment = create ( :rfc )
53- visit ( request_for_comment_path ( request_for_comment ) )
56+ it 'allows reporting of RfCs' , :js do
57+ accept_confirm do
58+ click_on I18n . t ( 'request_for_comments.report.report' )
59+ end
5460
55- accept_confirm do
56- click_on I18n . t ( 'request_for_comments.report.report' )
61+ expect ( page ) . to have_text ( I18n . t ( 'request_for_comments.report.reported' ) )
5762 end
63+ end
5864
59- expect ( page ) . to have_text ( I18n . t ( 'request_for_comments.report.reported' ) )
65+ context 'when reporting is disabled' do
66+ it 'dose not display the report button' do
67+ expect ( page ) . to have_no_button ( I18n . t ( 'request_for_comments.report.report' ) )
68+ end
6069 end
6170 end
6271end
You can’t perform that action at this time.
0 commit comments