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

Tests fail on Crystal 1.0.0 #29

Closed
hugopl opened this issue Mar 25, 2021 · 4 comments
Closed

Tests fail on Crystal 1.0.0 #29

hugopl opened this issue Mar 25, 2021 · 4 comments

Comments

@hugopl
Copy link

hugopl commented Mar 25, 2021

Applying this patch on shards.yml to let it compile with Crystal 1.0.0 make some tests fail:

diff --git a/shard.yml b/shard.yml
index 71562b6..4186bcf 100644
--- a/shard.yml
+++ b/shard.yml
@@ -4,7 +4,7 @@ version: 0.7.0
 dependencies:
   kemal-session:
     github: kemalcr/kemal-session
-    version: 0.12.1
+    version: ~>1.0.0
 
 development_dependencies:
   kemal:
@@ -14,6 +14,6 @@ authors:
   - Serdar Dogruyol <[email protected]>
 
 
-crystal: 0.35.0
+crystal: ">= 0.36.1, < 2.0.0"
 
 license: MIT

Crystal spec result:

Failures:

  1) CSRF allows POSTs with the correct token in FORM submit
     Failure/Error: client_response.status_code.should eq 404

       Expected: 404
            got: 403

     # spec/kemal-csrf_spec.cr:38

  2) CSRF allows POSTs with the correct token in HTTP header
     Failure/Error: client_response.status_code.should eq 404

       Expected: 404
            got: 403

     # spec/kemal-csrf_spec.cr:60

Finished in 3.19 milliseconds
9 examples, 2 failures, 0 errors, 0 pending

Failed examples:

crystal spec spec/kemal-csrf_spec.cr:20 # CSRF allows POSTs with the correct token in FORM submit
crystal spec spec/kemal-csrf_spec.cr:41 # CSRF allows POSTs with the correct token in HTTP header

With the same patch but using Crystal 0.36.1 all tests pass.

@ernest4
Copy link
Contributor

ernest4 commented Mar 26, 2021

Been looking at this code, there isn't much but I can't figure it out.

Maybe related to this?

@ernest4
Copy link
Contributor

ernest4 commented Mar 26, 2021

actually it's probably this

@ernest4
Copy link
Contributor

ernest4 commented Mar 26, 2021

PR fix #30

@sdogruyol
Copy link
Member

Fixed by #30

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