fix query_loading spec

pull/2040/head
Philipp Tessenow 10 years ago
parent fe359984e9
commit 8e3c56aef5
  1. 9
      spec/controllers/api/experimental/concerns/query_loading_spec.rb

@ -33,10 +33,16 @@ describe 'QueryLoading', :type => :controller do
include QueriesHelper
describe '#prepare_query' do
let!(:query) { FactoryGirl.create :query }
let(:user) { FactoryGirl.create(:user) }
let!(:query) do
FactoryGirl.create :query,
user: user
end
let(:view_context) { ActionController::Base.new.view_context }
before do
allow(User).to receive(:current).and_return(user)
allow(user).to receive(:allowed_to?).and_return true
view_context.stub(:add_filter_from_params)
end
@ -56,5 +62,4 @@ describe 'QueryLoading', :type => :controller do
end
end
end
end

Loading…
Cancel
Save