mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-18 14:48:24 -05:00
view spec updates
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user