Sha256: 1165cc16bffd7ff9f4227eb3103c062e1159922f70395a92c6be59bde7ae21e0
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
Given /^I have no images$/ do Image.delete_all end When /^I attach the image at "([^"]*)"$/ do |file_path| attach_file('image[uploaded_data]', File.join(Rails.root, file_path)) end Then /^the image "([^"]*)" should have uploaded successfully$/ do |file_name| Image.find_by_filename(file_name).nil?.should == false end Then /^I should have the correct default number of images$/ do image_number = RefinerySetting['image_thumbnails'].length Image.count.should == image_number + 1 end Then /^the image should have size "([^"]*)"$/ do |size| Image.first.size.should == size.to_i end Then /^the image should have width "([^"]*)"$/ do |width| Image.first.width.should == width.to_i end Then /^the image should have height "([^"]*)"$/ do |height| Image.first.height.should == height.to_i end Then /^the image should have content_type "([^"]*)"$/ do |content_type| Image.first.content_type.should == content_type.to_s end Then /^the image should have all default thumbnail generations$/ do parent_id = Image.first.id Image.find_all_by_parent_id(parent_id).each do |image| RefinerySetting['image_thumbnails'].has_key?(image.thumbnail.to_sym).should == true end end Then /^I should have ([0-9]+) images?$/ do |number| Image.count.should == number.to_i end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
refinerycms-0.9.7.10 | features/step_definitions/refinery/image_steps.rb |
refinerycms-0.9.7.9 | features/step_definitions/refinery/image_steps.rb |