debian-mirror-gitlab/spec/lib/gitlab/wiki_file_finder_spec.rb

22 lines
589 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
2018-11-08 19:23:39 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::WikiFileFinder do
2018-11-08 19:23:39 +05:30
describe '#find' do
2021-09-30 23:02:18 +05:30
let_it_be(:project) do
create(:project, :public, :wiki_repo).tap do |project|
project.wiki.create_page('Files/Title', 'Content')
project.wiki.create_page('CHANGELOG', 'Files example')
end
2018-11-08 19:23:39 +05:30
end
it_behaves_like 'file finder' do
subject { described_class.new(project, project.wiki.default_branch) }
2019-12-26 22:10:19 +05:30
let(:expected_file_by_path) { 'Files/Title.md' }
2018-11-08 19:23:39 +05:30
let(:expected_file_by_content) { 'CHANGELOG.md' }
end
end
end