Merge branch 'kiranh-868-new-bug'

This commit is contained in:
maxwell 2011-03-17 11:13:13 -07:00
commit 0fa2f5d3b6
4 changed files with 23 additions and 2 deletions

View file

@ -0,0 +1,10 @@
@javascript
Feature: Download Photos
Scenario: Download my photos
Given I am signed in
And I click on my name in the header
And I follow "settings"
Then I should be on my account settings page
And I follow "download my photos"
Then I should get download alert

View file

@ -110,3 +110,7 @@ When /^I wait for "([^\"]*)" to load$/ do |page_name|
current_location == path_to(page_name)
end
end
Then /^I should get download alert$/ do
page.evaluate_script("window.alert = function() { return true; }")
end

View file

@ -11,8 +11,8 @@ module PhotoMover
FileUtils::mkdir_p photos_dir
photos.each do |photo|
current_photo_location = "#{Rails.root}/public/uploads/images/#{photo.image_filename}"
new_photo_location = "#{photos_dir}/#{photo.image_filename}"
current_photo_location = "#{Rails.root}/public/uploads/images/#{photo.remote_photo_name}"
new_photo_location = "#{photos_dir}/#{photo.remote_photo_name}"
FileUtils::cp current_photo_location, new_photo_location
end

View file

@ -21,6 +21,13 @@ describe UsersController do
end
end
describe '#export_photos' do
it 'returns a tar file' do
get :export_photos
response.header["Content-Type"].should include "application/octet-stream"
end
end
describe '#public' do
it 'renders xml' do
sm = Factory(:status_message, :public => true, :author => @user.person)