Sha256: 6c72dc8a04c58616918653118b4773d15328a7beb39662a0c4a3f9c4895c1328
Contents?: true
Size: 990 Bytes
Versions: 33
Compression:
Stored size: 990 Bytes
Contents
describe "Quby.Models.Flag", -> beforeEach -> @flag = new Quby.Models.Flag( key: 'testkey' hidesQuestionsKeys: ["v_1"] showsQuestionsKeys: ["v_2"] ) @v_1 = new Quby.Models.Question(key: "v_1") @v_2 = new Quby.Models.Question(key: "v_2") @questions = new Quby.Collections.Questions([@v_1, @v_2]) describe "#initShowsHides", -> it 'looks up the hidesQuestionsKeys in the question collection to initialize the hidesQuestions collection', -> @flag.initShowsHides(@questions) @flag.get("hidesQuestions").should == new Quby.Collections.Questions([@v_1]) it 'looks up the showsQuestionsKeys in the question collection to initialize the showsQuestions collection', -> @flag.initShowsHides(@questions) @flag.get("showsQuestions").should == new Quby.Collections.Questions([@v_2]) it 'calls doHiding', -> spy = sinon.spy(@flag, 'doHiding') @flag.initShowsHides(@questions) expect(spy).toHaveBeenCalled()
Version data entries
33 entries across 33 versions & 1 rubygems