Permalink
Browse files

Merge pull request #485 from elzj/orphan-test-fixes

Test fixes for recent failures - Fixes for failing orphaning and work creation/deletion tests resulting from recent code changes.
  • Loading branch information...
2 parents 7a006fc + de0979d commit 4f944f18a058f175cf528912215cd33cd9939b11 @cesy committed Feb 18, 2012
@@ -23,7 +23,7 @@ def load_orphans
@orphans = [series]
elsif params[:pseud_id]
@pseuds = [Pseud.find(params[:pseud_id])]
- @orphans = pseuds.first.works
+ @orphans = @pseuds.first.works
else
@pseuds = current_user.pseuds
@orphans = current_user.works
@@ -10,7 +10,7 @@ class WorksController < ApplicationController
# this only works to check ownership of a SINGLE item and only if load_work has happened beforehand
before_filter :check_ownership, :except => [ :index, :show, :navigate, :new, :create, :import, :show_multiple, :edit_multiple, :update_multiple, :delete_multiple, :search, :marktoread, :drafts ]
before_filter :check_visibility, :only => [ :show, :navigate ]
- before_filter :set_author_attributes, :only => [ :edit, :update, :manage_chapters, :preview, :show, :navigate ]
+ before_filter :set_author_attributes, :only => [ :new, :create, :edit, :update, :manage_chapters, :preview, :show, :navigate ]
before_filter :set_instance_variables, :only => [ :new, :create, :edit, :update, :manage_chapters, :preview, :show, :navigate, :import ]
before_filter :set_instance_variables_tags, :only => [ :edit_tags, :update_tags, :preview_tags ]
@@ -20,9 +20,9 @@ Scenario: Orphan all works belonging to a user
And I should see "Shenanigans - the early years"
When I follow "Preferences"
When I follow "Orphan My Works"
- Then I should see "Orphan All Works"
- And I should see "Are you sure you want to permanently remove"
- When I choose "Use the default orphan pseud"
+ Then I should see "Orphan Works"
+ And I should see "Are you sure you want to"
+ When I choose "Take my pseud off as well"
And I press "Yes, I'm sure"
Then I should see "Orphaning was successful."
When I view the work "Shenanigans"
@@ -51,9 +51,9 @@ Given I have an orphan account
And I should see "Shenanigans - the early years"
When I follow "Preferences"
When I follow "Orphan My Works"
- Then I should see "Orphan All Works"
- And I should see "Are you sure you want to permanently remove"
- When I choose "Make a copy of my pseud under the orphan account"
+ Then I should see "Orphan Works"
+ And I should see "Are you sure you want to"
+ When I choose "Leave a copy of my pseud on"
And I press "Yes, I'm sure"
Then I should see "Orphaning was successful."
When I view the work "Shenanigans"
@@ -13,14 +13,14 @@ Scenario: Orphan all works belonging to one pseud
And I am logged in as "orphanpseud" with password "password"
When I post the work "Shenanigans"
And I post the work "Shenanigans 2"
- When I follow "orphanpseud"
+ When I follow "orphanpseud" within ".byline"
Then I should see "Shenanigans 2 by orphanpseud"
- When I follow "Pseuds"
+ When I follow "Back To Pseuds"
Then I should see "orphanpseud"
And I should see "2 works"
When I follow "Orphan Works"
- Then I should see "Orphan All Works by orphanpseud"
- When I choose "Use the default orphan pseud"
+ Then I should see "Orphan Works"
+ When I choose "Take my pseud off as well"
And I press "Yes, I'm sure"
Then I should see "Orphaning was successful."
When I view the work "Shenanigans"
@@ -38,15 +38,15 @@ Scenario: Orphan all works belonging to one pseud
And I am logged in as "orphanpseud" with password "password"
When I post the work "Shenanigans"
When I post the work "Shenanigans 2"
- When I follow "orphanpseud"
+ When I follow "orphanpseud" within ".byline"
Then I should see "Shenanigans by orphanpseud"
And I should see "Shenanigans 2 by orphanpseud"
- When I follow "Pseuds"
+ When I follow "Back To Pseuds"
Then I should see "orphanpseud"
And I should see "2 works"
When I follow "Orphan Works"
- Then I should see "Orphan All Works by orphanpseud"
- When I choose "Make a copy of my pseud under the orphan account"
+ Then I should see "Orphan Works"
+ When I choose "Leave a copy of my pseud on"
And I press "Yes, I'm sure"
Then I should see "Orphaning was successful."
When I view the work "Shenanigans"
@@ -18,7 +18,7 @@ Feature: Orphan work
And I should see "Orphan Work"
When I follow "Orphan Work"
Then I should see "Read More About The Orphaning Process"
- When I choose "Use the default orphan pseud"
+ When I choose "Take my pseud off as well"
And I press "Yes, I'm sure"
Then I should see "Orphaning was successful."
When I follow "Works"
@@ -35,7 +35,7 @@ Feature: Orphan work
And I should see "Orphan Work"
When I follow "Orphan Work"
Then I should see "Read More About The Orphaning Process"
- When I choose "Make a copy of my pseud under the orphan account"
+ When I choose "Leave a copy of my pseud on"
And I press "Yes, I'm sure"
Then I should see "Orphaning was successful."
When I follow "Works"

0 comments on commit 4f944f1

Please sign in to comment.