aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
diff options
context:
space:
mode:
authorTeddy Wing2017-12-18 12:53:48 +0100
committerTeddy Wing2017-12-18 12:53:48 +0100
commit5e6392d7f3c780797bf27ab6e6b5e3101f255cd5 (patch)
tree134da69d6acfe01acbeaa6f61b360aed721e338c /spec/controllers
parent6e056466a625881c168f5c17c50a41b9952fe6de (diff)
downloadchouette-core-5e6392d7f3c780797bf27ab6e6b5e3101f255cd5.tar.bz2
Imports#create: Add flash message
Add a message to let users know that the import has started and to be patient while it does its thing. Refs #5317
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/imports_controller_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/imports_controller_spec.rb b/spec/controllers/imports_controller_spec.rb
index 22be9f6ed..08495ff47 100644
--- a/spec/controllers/imports_controller_spec.rb
+++ b/spec/controllers/imports_controller_spec.rb
@@ -17,6 +17,20 @@ RSpec.describe ImportsController, :type => :controller do
end
end
+ describe "POST #create" do
+ it "displays a flash message" do
+ post :create, workbench_id: workbench.id,
+ import: {
+ name: 'Offre',
+ file: fixture_file_upload('nozip.zip')
+ }
+
+ expect(controller).to set_flash[:notice].to(
+ I18n.t('flash.imports.create.notice')
+ )
+ end
+ end
+
describe 'GET #download' do
it 'should be successful' do
get :download, workbench_id: workbench.id, id: import.id, token: import.token_download