Git Product home page Git Product logo

Comments (6)

mariusc avatar mariusc commented on September 27, 2024

I'm not really sure how to test the cache persistence across versions. Looks like I would need to simulate a change in the CFBundleShortVersionString, and I don't know how to do that. @nodes-ios/developer-team any suggestions on this one?

from cashier.

dominik-hadl avatar dominik-hadl commented on September 27, 2024

Look at how the cache compares versions. I think you should be able to manually change that in NSUserDefaults, so you could make the cache think there's new version :)

from cashier.

mariusc avatar mariusc commented on September 27, 2024

I made the change manually in NSUserDefaults, but my test failed. So I investigated a bit more and saw that [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"] is nil and [[NSBundle mainBundle] infoDictionary] is an empty dictionary.

image.

from cashier.

dominik-hadl avatar dominik-hadl commented on September 27, 2024

That is most likely because of the tests bundle. As a quick hack, swizzling the infoDictionary getter method of NSBundle with a custom implementation would work. Then you can easily control version numbers returned from your custom infoDictionary.

from cashier.

mariusc avatar mariusc commented on September 27, 2024

Made PR for Cashier tests #13. NOPersistentStore ignored for the moment

from cashier.

mariusc avatar mariusc commented on September 27, 2024

We have added some tests for NOPersistentStore in the Swift types tests. As always, tests can always be improved. But it's safe to close this issue now.

from cashier.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.