Skip to content

Commit fdb42e8

Browse files
committed
🥗 Journal: Writing Entries: Test adding Entry#summary
- #2 - #6 - #4 Clearly, when I started #8 I used the wrong name. It's not an `Entry#description`, it's an `Entry#summary`! Perhaps that would have been more obvious had I started with the spec, rather than the data model. Ah well, inside out and outside in are both valid.
1 parent 7c33d7b commit fdb42e8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
require "rails_helper"
2+
3+
# @see https://github.com/zinc-collective/convene-journal/issues/2
4+
RSpec.describe "Writing Entries", type: :system do
5+
let(:space) { create(:space, :with_entrance, :with_members) }
6+
let(:journal) { create(:journal, room: space.entrance) }
7+
8+
before do
9+
sign_in(space.members.first, space)
10+
end
11+
12+
it "Entries have a customizable feed-forward summary for browsing, search and sharing" do
13+
visit(polymorphic_path(journal.location(:new, child: :entry)))
14+
15+
fill_in("Body", with: 1000.times.map { Faker::Books::Dune.quote }.join("\r\n\r\n"))
16+
summary = %(
17+
So you thought you wanted 1000 Dune Quotes?
18+
Well, you were wrong. But here they are anyway!
19+
)
20+
fill_in("Summary", with: summary)
21+
22+
visit(polymorphic_path(space.entrance.location))
23+
expect(page).to have_content("Summary")
24+
end
25+
end

0 commit comments

Comments
 (0)