6 kyu

Single-Use Tickets: Don't Let Anyone Sneak In!

Description
Loading description...
Security
Fundamentals
  • Please sign in or sign up to leave a comment.
  • bethios Avatar

    It would be helpful if you could see what the test cases are so I can actually fix my code instead of guessing at the problem.

  • paragonHex Avatar

    This comment has been hidden.

  • nandastone Avatar

    Closures are a common technique for preventing access on object properties. This causes your random tests to fail as they expect read access to ticket.code and ticket.used.

    I think you need to be clearer about this in the description.

  • RichardB Avatar

    This comment has been hidden.

  • lucidz Avatar

    I get through all of your standard test cases fine, but when it get to the random test cases, it fails on the final test per random object, clearly after you've tampered with ticket.used = true;

    I have no idea why it would fail on that step on every random test, but work perfect on your hardcoded test cases...

  • pottspotts Avatar

    This comment has been hidden.

  • henryjayyu Avatar

    Ok... This is kind of a trick question. This is a 2 part question, so here's a hint. Don't assume anything and solve the 2 problems seperately.

  • henryjayyu Avatar

    Thanks for wasting my time =) Fix your test!

  • Magiczvn Avatar

    Please check the test case 7, it always fail whatever i try!

  • Azuaron Avatar

    You need to more clearly articulate the exact flow for everything in this kata, provide some example test cases, and/or provide much better error messages (pick at least two).

  • leviathan Avatar

    Everything worked well for me. I'd say 6 kyu seems about right, although I have no idea how to mark an estimated rank.

  • kesheshyan Avatar

    Are you sure that your random tests are correct? I have no idea why it expects false when the ticket is not used and the code is correct. I use closures so there are no ways to change used param directly. Please give me some clue what I'm duing wrong. P.S. I read the comments below and they didn't help.

  • FesterBesterTester Avatar

    I'm pretty sure some of your test cases want me to say a newly created ticket is invalid even though it matches correctCode.

  • jacobb Avatar

    Still can brute force the test cases.

  • jacobb Avatar

    This comment has been hidden.