spec/controllers/faqs_controller_spec.rb in spree-faq-2.1.1 vs spec/controllers/faqs_controller_spec.rb in spree-faq-2.2.0
- old
+ new
@@ -1,11 +1,13 @@
-RSpec.describe Spree::FaqsController, type: :controller do
+require 'spec_helper'
+describe Spree::FaqsController do
+
let!(:question_category) { create(:question_category) }
let!(:question) { create(:question, question_category: question_category) }
- before { allow(controller).to receive(:try_spree_current_user) }
+ before { controller.stub spree_current_user: nil }
context '#index' do
specify do
categories = [
question_category,
@@ -18,10 +20,10 @@
expect(response).to be_success
end
end
context '#default_title' do
- it 'returns default title' do
+ it 'return default title' do
expect(subject.default_title).to eq Spree.t(:frequently_asked_questions, scope: :spree_faq)
end
end
end