diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-06 15:10:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-06 15:10:54 +0000 |
commit | 1bb63ff080c33f0a70b5994f2d200dfd72ae1be6 (patch) | |
tree | 9776770b38119a3a26c58ecefc82163c212d30c3 /spec/models/user_detail_spec.rb | |
parent | ab7ca19e6844c37a715e378801409e297fd51512 (diff) | |
download | gitlab-ce-1bb63ff080c33f0a70b5994f2d200dfd72ae1be6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/user_detail_spec.rb')
-rw-r--r-- | spec/models/user_detail_spec.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/spec/models/user_detail_spec.rb b/spec/models/user_detail_spec.rb index 3c87dcdcbd9..ba7ea3f7ce2 100644 --- a/spec/models/user_detail_spec.rb +++ b/spec/models/user_detail_spec.rb @@ -25,29 +25,4 @@ RSpec.describe UserDetail do it { is_expected.to validate_length_of(:bio).is_at_most(255) } end end - - describe '#bio_html' do - let(:user) { create(:user, bio: 'some **bio**') } - - subject { user.user_detail.bio_html } - - it 'falls back to #bio when the html representation is missing' do - user.user_detail.update!(bio_html: nil) - - expect(subject).to eq(user.user_detail.bio) - end - - it 'stores rendered html' do - expect(subject).to include('some <strong>bio</strong>') - end - - it 'does not try to set the value when the column is not there' do - without_bio_html_column = UserDetail.column_names - ['bio_html'] - - expect(described_class).to receive(:column_names).at_least(:once).and_return(without_bio_html_column) - expect(user.user_detail).not_to receive(:bio_html=) - - subject - end - end end |