From 539b4f96a18ede4a971bbdb4963d65ae5eebb617 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 3 Dec 2008 20:53:50 +0100 Subject: [PATCH] add testcase for deleting a user. Resolves #734 --- app/models/user.rb | 2 +- test/selenium/users/delete_user.rsel | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 test/selenium/users/delete_user.rsel diff --git a/app/models/user.rb b/app/models/user.rb index fd649b10..33a9e4bc 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -124,7 +124,7 @@ class User < ActiveRecord::Base #for will_paginate plugin cattr_accessor :per_page - @@per_page = 1 + @@per_page = 5 def validate unless Tracks::Config.auth_schemes.include?(auth_type) diff --git a/test/selenium/users/delete_user.rsel b/test/selenium/users/delete_user.rsel new file mode 100644 index 00000000..32ff3545 --- /dev/null +++ b/test/selenium/users/delete_user.rsel @@ -0,0 +1,7 @@ +setup :fixtures => :all +login :as => 'admin' +open '/users' +assert_text_present "John Deere" +click "//tr[@id='user-3']//img" +assert_confirmation "Warning: this will delete user 'john', all their actions, contexts, project and notes. Are you sure that you want to continue?" +wait_for_text_not_present "John Deere" \ No newline at end of file