From fa97a5a5a2f4e30efec6dd47e5466f40234537c2 Mon Sep 17 00:00:00 2001
From: Sayed Abdelhaleem <visualsayed@gmail.com>
Date: Mon, 1 Feb 2016 10:55:36 +0200
Subject: [PATCH] Issue #6662: fix refresh my photos routing error

closes #6667
---
 app/views/users/edit.mobile.haml         |  8 ++++----
 features/desktop/download_photos.feature | 10 ++++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/app/views/users/edit.mobile.haml b/app/views/users/edit.mobile.haml
index dfec1832ff..900b7b0b51 100644
--- a/app/views/users/edit.mobile.haml
+++ b/app/views/users/edit.mobile.haml
@@ -167,9 +167,9 @@
       = link_to t('.download_export'), download_profile_user_path, class: "btn btn-success"
       %h6
         = t('.last_exported_at', timestamp: current_user.exported_at)
-      = link_to t('.request_export_update'), export_profile_user_path, class: "btn"
+      = link_to t('.request_export_update'), export_profile_user_path, class: "btn", method: :post
     - else
-      = link_to t('.request_export'), export_profile_user_path, :class => "btn"
+      = link_to t('.request_export'), export_profile_user_path, class: "btn", method: :post
     %br
     %br
     - if current_user.exporting_photos
@@ -178,9 +178,9 @@
       = link_to t('.download_export_photos'), download_photos_user_path, class: "btn btn-success"
       %h6
         = t('.last_exported_at', timestamp: current_user.exported_photos_at)
-      = link_to t('.request_export_photos_update'), export_photos_user_path, class: "btn"
+      = link_to t('.request_export_photos_update'), export_photos_user_path, class: "btn", method: :post
     - else
-      = link_to t('.request_export_photos'), export_photos_user_path, :class => "btn"
+      = link_to t('.request_export_photos'), export_photos_user_path, class: "btn", method: :post
 
   %hr
   .span-5.last
diff --git a/features/desktop/download_photos.feature b/features/desktop/download_photos.feature
index 8a9e63a074..25fb3bcc26 100644
--- a/features/desktop/download_photos.feature
+++ b/features/desktop/download_photos.feature
@@ -10,6 +10,16 @@ Feature: Download Photos
     Then I should see a flash message indicating success
     And I should see a flash message containing "We are currently processing your photos"
 
+  Scenario: Refresh my photos
+    Given I am signed in
+    When I did request my photos
+    And I click on my name in the header
+    When I follow "Settings"
+    Then I should be on my account settings page
+    When I follow "Refresh my photos"
+    Then I should see a flash message indicating success
+    And I should see a flash message containing "We are currently processing your photos"
+
   Scenario: Download my photos
     Given I am signed in
     When I did request my photos
-- 
GitLab