rails_sso 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_sso/helpers.rb +3 -2
- data/lib/rails_sso/version.rb +1 -1
- data/test/dummy/log/test.log +1355 -0
- data/test/lib/rails_sso/helpers_test.rb +38 -0
- metadata +39 -37
@@ -0,0 +1,38 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class RailsSso::HelpersTest < ActionController::TestCase
|
4
|
+
tests ApplicationController
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@mock_warden = OpenStruct.new
|
8
|
+
@controller.request.env["warden"] = @mock_warden
|
9
|
+
end
|
10
|
+
|
11
|
+
test "provide access to warden instance" do
|
12
|
+
assert_equal @mock_warden, @controller.warden
|
13
|
+
end
|
14
|
+
|
15
|
+
test "proxy signed_in? to authenticated?" do
|
16
|
+
@mock_warden.expects(:authenticated?).once
|
17
|
+
@controller.user_signed_in?
|
18
|
+
end
|
19
|
+
|
20
|
+
test "proxy current_user_data to authenticate" do
|
21
|
+
@mock_warden.expects(:authenticate).once
|
22
|
+
@controller.current_user_data
|
23
|
+
end
|
24
|
+
|
25
|
+
test "proxy authenticate_user! to authenticate!" do
|
26
|
+
@mock_warden.expects(:authenticate!).once
|
27
|
+
@controller.authenticate_user!
|
28
|
+
end
|
29
|
+
|
30
|
+
test "keep current path in session during authentication" do
|
31
|
+
@mock_warden.stubs(:authenticate!)
|
32
|
+
@request.stubs(:path).returns("something")
|
33
|
+
|
34
|
+
@controller.authenticate_user!
|
35
|
+
|
36
|
+
assert_equal "something", @controller.session[:rails_sso_return_path]
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Dudulski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -190,6 +190,7 @@ files:
|
|
190
190
|
- test/lib/rails_sso/app_test.rb
|
191
191
|
- test/lib/rails_sso/configuration_test.rb
|
192
192
|
- test/lib/rails_sso/failure_app_test.rb
|
193
|
+
- test/lib/rails_sso/helpers_test.rb
|
193
194
|
- test/lib/rails_sso/response_error_test.rb
|
194
195
|
- test/lib/rails_sso/sso_strategy_test.rb
|
195
196
|
- test/rails_sso_test.rb
|
@@ -216,54 +217,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
217
|
version: '0'
|
217
218
|
requirements: []
|
218
219
|
rubyforge_project:
|
219
|
-
rubygems_version: 2.4.5
|
220
|
+
rubygems_version: 2.4.5.1
|
220
221
|
signing_key:
|
221
222
|
specification_version: 4
|
222
223
|
summary: SSO Rails Engine
|
223
224
|
test_files:
|
224
|
-
- test/
|
225
|
-
- test/
|
225
|
+
- test/controllers/rails_sso/sessions_controller_test.rb
|
226
|
+
- test/test_helper.rb
|
227
|
+
- test/lib/rails_sso/failure_app_test.rb
|
226
228
|
- test/lib/rails_sso/sso_strategy_test.rb
|
227
229
|
- test/lib/rails_sso/response_error_test.rb
|
228
|
-
- test/lib/rails_sso/failure_app_test.rb
|
229
230
|
- test/lib/rails_sso/configuration_test.rb
|
231
|
+
- test/lib/rails_sso/app_test.rb
|
232
|
+
- test/lib/rails_sso/helpers_test.rb
|
230
233
|
- test/rails_sso_test.rb
|
231
|
-
- test/test_helper.rb
|
232
|
-
- test/routes/sso_routes_test.rb
|
233
|
-
- test/controllers/rails_sso/sessions_controller_test.rb
|
234
|
-
- test/dummy/README.rdoc
|
235
|
-
- test/dummy/public/favicon.ico
|
236
234
|
- test/dummy/public/404.html
|
237
|
-
- test/dummy/public/422.html
|
238
235
|
- test/dummy/public/500.html
|
239
|
-
- test/dummy/
|
240
|
-
- test/dummy/
|
241
|
-
- test/dummy/
|
242
|
-
- test/dummy/
|
243
|
-
- test/dummy/
|
244
|
-
- test/dummy/
|
245
|
-
- test/dummy/
|
246
|
-
- test/dummy/
|
247
|
-
- test/dummy/
|
248
|
-
- test/dummy/
|
249
|
-
- test/dummy/config/
|
250
|
-
- test/dummy/config/database.yml
|
236
|
+
- test/dummy/public/422.html
|
237
|
+
- test/dummy/public/favicon.ico
|
238
|
+
- test/dummy/Rakefile
|
239
|
+
- test/dummy/config.ru
|
240
|
+
- test/dummy/README.rdoc
|
241
|
+
- test/dummy/app/views/layouts/application.html.erb
|
242
|
+
- test/dummy/app/controllers/application_controller.rb
|
243
|
+
- test/dummy/app/assets/javascripts/application.js
|
244
|
+
- test/dummy/app/assets/stylesheets/application.css
|
245
|
+
- test/dummy/app/helpers/application_helper.rb
|
246
|
+
- test/dummy/config/application.rb
|
251
247
|
- test/dummy/config/locales/en.yml
|
252
|
-
- test/dummy/config/
|
253
|
-
- test/dummy/config/initializers/
|
254
|
-
- test/dummy/config/initializers/assets.rb
|
255
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
248
|
+
- test/dummy/config/boot.rb
|
249
|
+
- test/dummy/config/initializers/mime_types.rb
|
256
250
|
- test/dummy/config/initializers/session_store.rb
|
257
251
|
- test/dummy/config/initializers/sso.rb
|
252
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
253
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
258
254
|
- test/dummy/config/initializers/inflections.rb
|
255
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
259
256
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
260
|
-
- test/dummy/config/initializers/
|
261
|
-
- test/dummy/config/
|
257
|
+
- test/dummy/config/initializers/assets.rb
|
258
|
+
- test/dummy/config/environment.rb
|
259
|
+
- test/dummy/config/routes.rb
|
260
|
+
- test/dummy/config/environments/production.rb
|
261
|
+
- test/dummy/config/environments/development.rb
|
262
|
+
- test/dummy/config/environments/test.rb
|
263
|
+
- test/dummy/config/secrets.yml
|
264
|
+
- test/dummy/config/database.yml
|
265
|
+
- test/dummy/bin/setup
|
266
|
+
- test/dummy/bin/bundle
|
267
|
+
- test/dummy/bin/rails
|
268
|
+
- test/dummy/bin/rake
|
262
269
|
- test/dummy/log/test.log
|
263
|
-
- test/
|
264
|
-
- test/
|
265
|
-
- test/dummy/app/controllers/application_controller.rb
|
266
|
-
- test/dummy/app/assets/stylesheets/application.css
|
267
|
-
- test/dummy/app/assets/javascripts/application.js
|
268
|
-
- test/dummy/Rakefile
|
269
|
-
- test/dummy/config.ru
|
270
|
+
- test/routes/sso_routes_test.rb
|
271
|
+
- test/services/rails_sso/fetch_user_test.rb
|