Sha256: 03b4d3409deacad47311d570b21bf40e27fc44a13bbe51367a4f04bf58af11f4
Contents?: true
Size: 984 Bytes
Versions: 23
Compression:
Stored size: 984 Bytes
Contents
require 'spec_helper' feature "Attachments" do background do sign_in end scenario "show message if item is not saved" do click_link "Blogs" click_link "Create new Blog" page.should have_content "First save to enable uploads" end scenario "show upload form" do create(:blog) click_link "Blogs" click_link "Edit" page.should have_selector "#attachments" end context "with image" do background do blog = create(:blog) @attachment = Brightcontent::Attachment.create!(:asset => Rails.root.join("public/rails.png").open) blog.attachments << @attachment click_link "Blogs" click_link "Edit" end scenario "shows images" do page.should have_selector "#attachment_#{@attachment.id}" end scenario "delete image" do within "#attachment_#{@attachment.id}" do click_link "Delete" end page.should_not have_selector "#attachment_#{@attachment.id}" end end end
Version data entries
23 entries across 23 versions & 1 rubygems