BigW Consortium Gitlab

user_git_access_wiki_page_spec.rb 602 Bytes
Newer Older
1 2
require 'spec_helper'

3
describe 'Projects > Wiki > User views Git access wiki page' do
4
  let(:user) { create(:user) }
5
  let(:project) { create(:project, :public) }
6
  let(:wiki_page) { create(:wiki_page, wiki: project.wiki, attrs: { title: 'home', content: '[some link](other-page)' }) }
7 8

  before do
9
    sign_in(user)
10 11 12
  end

  scenario 'Visit Wiki Page Current Commit' do
13
    visit project_wiki_path(project, wiki_page)
14 15

    click_link 'Clone repository'
16
    expect(page).to have_text("Clone repository #{project.wiki.full_path}")
17
    expect(page).to have_text(project.wiki.http_url_to_repo)
18 19
  end
end