BigW Consortium Gitlab

gfm_autocomplete_load_spec.rb 461 Bytes
Newer Older
1 2
require 'spec_helper'

3
describe 'GFM autocomplete loading', js: true do
4
  let(:project) { create(:project) }
5 6

  before do
7
    sign_in(create(:admin))
8

9
    visit project_path(project)
10 11 12
  end

  it 'does not load on project#show' do
13
    expect(evaluate_script('gl.GfmAutoComplete')).to eq(nil)
14 15 16
  end

  it 'loads on new issue page' do
17
    visit new_project_issue_path(project)
18

19
    expect(evaluate_script('gl.GfmAutoComplete.dataSources')).not_to eq({})
20 21
  end
end