Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failure for xml_security_test #2

Closed
ekolve opened this issue Jan 31, 2011 · 6 comments
Closed

test failure for xml_security_test #2

ekolve opened this issue Jan 31, 2011 · 6 comments

Comments

@ekolve
Copy link

ekolve commented Jan 31, 2011

The test xml_security_test.rb contains no assertions. I added an assertion for validate_doc as follows on line 13:

  assert @document.validate_doc(base64cert, nil)

And I receive the following error. I am running Ruby 1.8.7 P330. I forked and commited the change to git://github.com/ekolve/ruby-saml.git

1) Failure:
test: XmlSecurity should should provide getters and settings. (XmlSecurityTest)
[./test/xml_security_test.rb:13:in `__bind_1296505308_249038'
 /usr/lib/ruby/gems/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb:382:in `call'
 /usr/lib/ruby/gems/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb:382:in `test: XmlSecurity should should provide getters and settings. '
 /usr/lib/ruby/gems/1.8/gems/mocha-0.9.10/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:22:in `__send__'
 /usr/lib/ruby/gems/1.8/gems/mocha-0.9.10/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:22:in `run']:
<false> is not true.
@christianbpedersen
Copy link

Very odd - I'm not seeing that when I run the tests here?

@ekolve
Copy link
Author

ekolve commented Jan 31, 2011

Does validate_doc return true for you? Did you try adding the assert that I added in? What version of ruby are you running?

@christianbpedersen
Copy link

ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

It's this test,right:

should "should provide getters and settings" do
  base64cert = @document.elements["//ds:X509Certificate"].text
  @document.validate_doc(base64cert, nil)
end

@ekolve
Copy link
Author

ekolve commented Feb 1, 2011

Correct. What I am seeing is that the statement:

@document.validate_doc(base64cert, nil)

is returning false.

@morten
Copy link
Contributor

morten commented Feb 2, 2011

Hi Eric,

The point of the test was to provoke the behavior you reported here https://github.com/onelogin/ruby-saml/issues/issue/1 - so it's not about asserting the outcome of the validate call, it's about not getting an exception. I've rephrased the should statement.

Morten

@ekolve
Copy link
Author

ekolve commented Feb 2, 2011

Got it, that makes more sense. I am trying to get a validate_doc call to pass to confirm that a signature can be verified, is there some static response that I can use to confirm that this works?

thanks,
eric

zwily referenced this issue in zwily/ruby-saml Apr 17, 2012
add basic support for encrypted assertions
ylansegal pushed a commit to ylansegal/ruby-saml that referenced this issue Aug 18, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants