Skip to content

Commit

Permalink
fix specs, current user is required
Browse files Browse the repository at this point in the history
  • Loading branch information
lpichler committed Feb 28, 2018
1 parent 6c35520 commit e8f44c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/lib/services/resource_sharer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@
let(:resource_to_be_shared) { FactoryGirl.build(:miq_group) }

it "is invalid" do
expect(subject).not_to be_valid
expect(subject.errors.full_messages).to include(a_string_including("Resource is not sharable"))
User.with_user(user) do
expect(subject).not_to be_valid
expect(subject.errors.full_messages).to include(a_string_including("Resource is not sharable"))
end
end
end

Expand Down

0 comments on commit e8f44c7

Please sign in to comment.