DEV: correct spec making bad assumptions


DEV: correct spec making bad assumptions

bio_cooked is not meant to be touched directly, on save we “cook” the raw bio.

diff --git a/spec/requests/groups_controller_spec.rb b/spec/requests/groups_controller_spec.rb
index 9125334..83acf88 100644
--- a/spec/requests/groups_controller_spec.rb
+++ b/spec/requests/groups_controller_spec.rb
@@ -292,7 +292,7 @@ describe GroupsController do
     it 'should respond to HTML' do
-      group.update_attribute(:bio_cooked, 'testing group bio')
+      group.update!(bio_raw: 'testing **group** bio')
       get "/groups/#{}.html"
@@ -302,8 +302,9 @@ describe GroupsController do
         property: 'og:title', content:
+      # note this uses an excerpt so it strips html
       expect(response.body).to have_tag(:meta, with: {
-        property: 'og:description', content: group.bio_cooked
+        property: 'og:description', content: 'testing group bio'

GitHub sha: 89c4332a

1 Like

@majakomel can you add a quick spec to test the clearing case (a simple model spec is fine)

Fabricate a group with random cooked, set raw cooked to empty … save

1 Like