From c5a2d25f9d37e04d8c7c4c2b00c02c97b17fb2d0 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 2 Jul 2022 06:26:39 +0200 Subject: [PATCH] Add test for `Settings::ExportController` index view --- .../settings/export_controller_spec.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/controllers/settings/export_controller_spec.rb diff --git a/spec/controllers/settings/export_controller_spec.rb b/spec/controllers/settings/export_controller_spec.rb new file mode 100644 index 00000000..cebff68f --- /dev/null +++ b/spec/controllers/settings/export_controller_spec.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require "rails_helper" + +describe Settings::ExportController, type: :controller do + describe "#index" do + subject { get :index } + + context "user signed in" do + let(:user) { FactoryBot.create(:user) } + + before { sign_in user } + + it "renders the index template" do + subject + expect(response).to render_template(:index) + end + end + end +end