diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-29 19:02:11 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-02 13:04:10 -0400 |
commit | 442a0663da437abcdec7fbd86967b6d8980d4090 (patch) | |
tree | fd59418af092762cb0117637fca5aa94ee3af595 /spec/features/groups_spec.rb | |
parent | 023dd2907b4afa0bae5f8482cae75e1edd6954a8 (diff) | |
download | gitlab-ce-442a0663da437abcdec7fbd86967b6d8980d4090.tar.gz |
Add feature specs for Project and Group description rendering
Diffstat (limited to 'spec/features/groups_spec.rb')
-rw-r--r-- | spec/features/groups_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb new file mode 100644 index 00000000000..edc1c63a0aa --- /dev/null +++ b/spec/features/groups_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper' + +feature 'Group' do + describe 'description' do + let(:group) { create(:group) } + let(:path) { group_path(group) } + + before do + login_as(:admin) + end + + it 'parses Markdown' do + group.update_attribute(:description, 'This is **my** group') + visit path + expect(page).to have_css('.description > p > strong') + end + + it 'passes through html-pipeline' do + group.update_attribute(:description, 'This group is the :poop:') + visit path + expect(page).to have_css('.description > p > img') + end + + it 'sanitizes unwanted tags' do + group.update_attribute(:description, '# Group Description') + visit path + expect(page).not_to have_css('.description h1') + end + + it 'permits `rel` attribute on links' do + group.update_attribute(:description, 'https://google.com/') + visit path + expect(page).to have_css('.description a[rel]') + end + end +end |