Git Product home page Git Product logo

Comments (4)

burzum avatar burzum commented on September 15, 2024

Which branch are you using? I've added a few more tests and I can not verify this wrong behaviour in the develop branch. Tests in master branch pass also.

Can you please provide a test case for that in a pull request? Thank you.

from utils.

 avatar commented on September 15, 2024

I downloaded the Master branch on 2012-12-27. But I see it was fixed in the develop branch a while ago.

See: #49.

Master branch is still wrong though, tests are also incomplete:

/**
 * Test save unique
 *
 * @return void
 */
    public function testSaveUnique() {
        $this->Model->create(array('title' => 'Fourth Article'));
        $this->Model->save();
        $this->Model->create(array('title' => 'Fourth Article!!'));
        $this->Model->save();
        $this->Model->create(array('title' => 'Fourth "Article"'));
        $this->Model->save();

        $results = $this->Model->find('all', array('conditions' => array('title LIKE' => 'Fourth%')));
        $this->assertEqual(count($results), 3);
        $this->assertEqual($results[0]['SluggedArticle']['slug'], 'fourth_article');
        $this->assertEqual($results[1]['SluggedArticle']['slug'], 'fourth_article_1');
        $this->assertEqual($results[2]['SluggedArticle']['slug'], 'fourth_article_2');
    }

If you'd add a fourth create with just "Fourth" as a title, the slug will be "fourth_1" instead of "fourth".

from utils.

burzum avatar burzum commented on September 15, 2024

I'll try to do a merge to master until the end of the week. There are a few other things that need to be done in the plugin before we can merge it to master.

Thanks for the detailed error report! :) 👍

from utils.

burzum avatar burzum commented on September 15, 2024

This has been fixed in the develop branch, see also the tests for it.

from utils.

Related Issues (20)

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.