OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/modules/pdf_export/spec/shared_examples.rb

19 lines
496 B

shared_examples_for "should let you create a configuration" do
before do
post 'create', params: params
end
it { expect(response).to redirect_to :action => 'index' }
it { expect(flash[:notice]).to eq(I18n.t(:notice_successful_create)) }
end
shared_examples_for "should not let you create a configuration" do
before do
post 'create', params: params
end
it { expect(response).to render_template('new') }
it {expect(assigns(:config).errors.messages).to_not be_empty}
end