BigW Consortium Gitlab

gfm_autocomplete_load_spec.rb 539 Bytes
Newer Older
1 2 3 4 5 6
require 'spec_helper'

describe 'GFM autocomplete loading', feature: true, js: true do
  let(:project)   { create(:project) }

  before do
Phil Hughes committed
7
    login_as :admin
8 9 10 11 12

    visit namespace_project_path(project.namespace, project)
  end

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

  it 'loads on new issue page' do
    visit new_namespace_project_issue_path(project.namespace, project)

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