view spec updates

This commit is contained in:
Brenda Wallace
2019-06-25 21:06:32 +12:00
parent ec1824fd4f
commit 7f00a5063b
3 changed files with 5 additions and 29 deletions

View File

@@ -12,6 +12,9 @@
- if @post.updated_at > @post.created_at
and edited at
= @post.updated_at
= link_to "Permalink", post
:growstuff_markdown
#{ strip_tags @post.body }
@@ -43,30 +46,3 @@
-# .post-body
-# :growstuff_markdown
-# #{ strip_tags post.body }
-# - unless defined?(hide_comments)
-# .post-comments
-# %ul.list-inline
-# %li.first
-# = link_to localize_plural(post.comments, Comment),
-# post_path(post, anchor: 'comments')
-# - if can? :create, Comment
-# %li= link_to "Reply", new_comment_path(post_id: post.id)
-# %li= link_to "Permalink", post
-# - if can? :edit, post
-# %li= link_to "Edit", edit_post_path(post)
-# .like-count
-# = pluralize(post.likes.count, "like") unless post.likes.empty?
-# - if member_signed_in?
-# - if !post.members.include? current_member
-# - if can?(:new, Like)
-# = link_to 'Like', likes_path(post_id: post.id, format: :json),
-# method: :post, remote: true, class: 'post-like'
-# - else
-# - like = post.likes.find_by(member: current_member)
-# - if like && can?(:destroy, like)
-# = link_to 'Unlike', like_path(id: like.id, format: :json),
-# method: :delete, remote: true, class: 'post-like'

View File

@@ -5,7 +5,7 @@ describe 'members/show.rss.haml', type: "view" do
before do
@member = assign(:member, FactoryBot.create(:member, login_name: 'callum'))
@post1 = FactoryBot.create(:post, id: 1, author: @member)
@post1 = FactoryBot.create(:post, id: 1, author: @member, body: "This is some text.")
@post2 = FactoryBot.create(:markdown_post, id: 2, author: @member)
assign(:posts, [@post1, @post2])
render

View File

@@ -51,7 +51,7 @@ describe "plantings/show" do
planting.photos << photo2
render
assert_select "img[src='#{photo1.fullsize_url}']"
assert_select "img[src='#{photo2.thumbnail_url}']"
assert_select "img[src='#{photo2.fullsize_url}']"
end
describe "shows a link to add photos" do