Commit f4d68f39 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

set current_user for project spec

parent 01186f9f
...@@ -27,8 +27,14 @@ ...@@ -27,8 +27,14 @@
require 'spec_helper' require 'spec_helper'
describe Project do describe Project do
before(:each) { enable_observers } let(:user) { create(:user) }
after(:each) { disable_observers }
before do
enable_observers
Thread.current[:current_user] = user
end
after { disable_observers }
describe "Associations" do describe "Associations" do
it { should belong_to(:group) } it { should belong_to(:group) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment