authn 3.7.2 → 3.7.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,25 @@
1
1
  CHANGELOG
2
2
  ---------
3
3
 
4
+ 3.7.4 / 2012-09-21
5
+ ==================
6
+
7
+ * Fixing a problem with tests so that they don't fail due to
8
+ private method calling
4
9
 
5
- 1.0.0 / YYYY-MM-DD
10
+ 3.7.3 / 2012-09-21
6
11
  ==================
7
12
 
13
+ * Updating the changelog with history
14
+
15
+ 3.7.2 / 2012-09-21
16
+ ==================
17
+
18
+ * Updating the readme with new details about authn-rails
19
+ * Commenting out non-working tests
20
+ * Adding a convience before filter to require login
21
+
22
+ 1.0.0 / 2012-MM-DD
23
+ ==================
8
24
 
25
+ * Initial release
@@ -1,3 +1,3 @@
1
1
  module AuthN
2
- VERSION = "3.7.2"
2
+ VERSION = "3.7.4"
3
3
  end
@@ -12,31 +12,31 @@ class TestAuthNSession < MiniTest::Unit::TestCase
12
12
  # generate_session_and_instance_from klass.authenticate identifiers, password
13
13
  # end
14
14
  def test_that_login_returns_account_given_good_credentials
15
- instance = @controller.login email: "kurtis@example.com", password: "12341234"
15
+ instance = @controller.instance_eval { login email: "kurtis@example.com", password: "12341234" }
16
16
  actual = instance.class
17
17
  expected = Account
18
18
  assert_equal expected, actual
19
19
  end
20
20
 
21
21
  def test_that_login_returns_false_if_bad_password
22
- actual = @controller.login email: "kurtis@example.com", password: "12341233"
22
+ actual = @controller.instance_eval { login email: "kurtis@example.com", password: "12341233" }
23
23
  expected = false
24
24
  assert_equal expected, actual
25
25
  end
26
26
 
27
27
  def test_that_login_returns_nil_if_no_account_found
28
- actual = @controller.login email: "kurti@example.com", password: "12341234"
28
+ actual = @controller.instance_eval { login email: "kurti@example.com", password: "12341234" }
29
29
  expected = nil
30
30
  assert_equal expected, actual
31
31
  end
32
32
 
33
33
  def test_that_login_sets_session
34
- @controller.login email: "kurtis@example.com", password: "12341234"
34
+ @controller.instance_eval { login email: "kurtis@example.com", password: "12341234" }
35
35
  assert @controller.session[:session_account_id]
36
36
  end
37
37
 
38
38
  def test_that_login_stores_session_account_id
39
- instance = @controller.login email: "kurtis@example.com", password: "12341234"
39
+ instance = @controller.instance_eval { login email: "kurtis@example.com", password: "12341234" }
40
40
  actual = @controller.session[:session_account_id]
41
41
  expected = instance.id
42
42
  assert_equal expected, actual
@@ -46,19 +46,19 @@ class TestAuthNSession < MiniTest::Unit::TestCase
46
46
  # instance_and_session instance
47
47
  # end
48
48
  def test_that_auto_login_returns_instance
49
- instance = @controller.auto_login Account.new
49
+ instance = @controller.instance_eval { auto_login Account.new }
50
50
  actual = instance.class
51
51
  expected = Account
52
52
  assert_equal expected, actual
53
53
  end
54
54
 
55
55
  def test_that_auto_login_sets_session
56
- @controller.auto_login Account.new
56
+ @controller.instance_eval { auto_login Account.new }
57
57
  assert @controller.session.has_key? :session_account_id
58
58
  end
59
59
 
60
60
  def test_that_auto_login_stores_session_account_id
61
- instance = @controller.auto_login Account.new
61
+ instance = @controller.instance_eval { auto_login Account.new }
62
62
  actual = @controller.session[:session_account_id]
63
63
  expected = instance.id
64
64
  assert_equal expected, actual
@@ -71,15 +71,15 @@ class TestAuthNSession < MiniTest::Unit::TestCase
71
71
  # end
72
72
 
73
73
  def test_that_logged_in_returns_true_if_logged_in
74
- @controller.login email: "kurtis@example.com", password: "12341234"
75
- actual = @controller.logged_in?
74
+ @controller.instance_eval { login email: "kurtis@example.com", password: "12341234" }
75
+ actual = @controller.instance_eval { logged_in? }
76
76
  expected = true
77
77
  assert_equal expected, actual
78
78
  end
79
79
 
80
80
  def test_that_logged_in_returns_false_if_not_logged_in
81
81
  @controller.session
82
- actual = @controller.logged_in?
82
+ actual = @controller.instance_eval { logged_in? }
83
83
  expected = false
84
84
  assert_equal expected, actual
85
85
  end
@@ -91,8 +91,8 @@ class TestAuthNSession < MiniTest::Unit::TestCase
91
91
  # end
92
92
 
93
93
  def test_that_logout_empties_the_session
94
- @controller.login email: "kurtis@example.com", password: "12341234"
95
- @controller.logout
94
+ @controller.instance_eval { login email: "kurtis@example.com", password: "12341234" }
95
+ @controller.instance_eval { logout }
96
96
  refute @controller.session.has_key? :session_account_id
97
97
  end
98
98
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authn
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.2
4
+ version: 3.7.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  segments:
133
133
  - 0
134
- hash: -4353951558489983724
134
+ hash: 2261638177236117174
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  none: false
137
137
  requirements:
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  segments:
142
142
  - 0
143
- hash: -4353951558489983724
143
+ hash: 2261638177236117174
144
144
  requirements: []
145
145
  rubyforge_project:
146
146
  rubygems_version: 1.8.24