require 'spec_helper'
context 'on repository should find the highest permission' do
let!(:team) { create :team_with_user_and_permission }
end
end
perm = create :permission, subject: user, item: repository,
role: 'owner'
repository.permissions << perm
user.permissions << perm
perm
end
it 'should fetch the higher owner permission' do
expect(repository.highest_permission(user)).to eq(owner_permission)
end
end
end
end