debian-mirror-gitlab/spec/views/profiles/preferences/show.html.haml_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

72 lines
1.6 KiB
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe 'profiles/preferences/show' do
2019-12-26 22:10:19 +05:30
using RSpec::Parameterized::TableSyntax
let_it_be(:user) { build(:user) }
before do
assign(:user, user)
allow(controller).to receive(:current_user).and_return(user)
end
2020-10-24 23:57:45 +05:30
context 'navigation theme' do
before do
render
end
it 'has an id for anchoring' do
expect(rendered).to have_css('#navigation-theme')
end
2021-01-03 14:25:43 +05:30
it 'has correct stylesheet tags' do
Gitlab::Themes.each do |theme|
next unless theme.css_filename
expect(rendered).to have_selector("link[href*=\"themes/#{theme.css_filename}\"]", visible: false)
end
end
2020-10-24 23:57:45 +05:30
end
context 'syntax highlighting theme' do
before do
render
end
it 'has an id for anchoring' do
expect(rendered).to have_css('#syntax-highlighting-theme')
end
end
2020-03-13 15:44:24 +05:30
context 'behavior' do
before do
render
end
it 'has option for Render whitespace characters in the Web IDE' do
expect(rendered).to have_unchecked_field('Render whitespace characters in the Web IDE')
end
2020-10-24 23:57:45 +05:30
it 'has an id for anchoring' do
expect(rendered).to have_css('#behavior')
end
it 'has helpful homepage setup guidance' do
expect(rendered).to have_field('Homepage content')
expect(rendered).to have_content('Choose what content you want to see on your homepage.')
end
end
context 'localization' do
before do
render
end
it 'has an id for anchoring' do
expect(rendered).to have_css('#localization')
end
2020-03-13 15:44:24 +05:30
end
2019-12-26 22:10:19 +05:30
end