debian-mirror-gitlab/spec/lib/gitlab/search/found_wiki_page_spec.rb

19 lines
488 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Search::FoundWikiPage do
let(:project) { create(:project, :public, :repository) }
describe 'policy' do
let(:project) { build(:project, :repository) }
let(:found_blob) { Gitlab::Search::FoundBlob.new(project: project) }
subject { described_class.new(found_blob) }
it 'works with policy' do
expect(Ability.allowed?(project.creator, :read_wiki_page, subject)).to be_truthy
end
end
end