Skip to content

Instantly share code, notes, and snippets.

@rklancer
Created June 23, 2010 20:55
Show Gist options
  • Save rklancer/450535 to your computer and use it in GitHub Desktop.
Save rklancer/450535 to your computer and use it in GitHub Desktop.
module("Smartgraphs.questionSequenceController question-sequence navigation", {
setup: function () {
Smartgraphs.Question.FIXTURES = [
SC.mixin(SC.copy(qhash), {guid: 'q1', sequence: 'test-sequence-1'}),
SC.mixin(SC.copy(qhash), {guid: 'q2', sequence: 'test-sequence-2'})
];
Smartgraphs.QuestionSequence.FIXTURES = [
{ guid: 'test-sequence-1', questions: ['q1'] },
{ guid: 'test-sequence-2', questions: ['q2'] }
];
Smartgraphs.set('store', SC.Store.create().from(SC.Record.fixtures));
seq1 = Smartgraphs.store.find(Smartgraphs.QuestionSequence, 'test-sequence-1');
seq2 = Smartgraphs.store.find(Smartgraphs.QuestionSequence, 'test-sequence-2');
q1 = Smartgraphs.store.find(Smartgraphs.Question, 'q1');
q2 = Smartgraphs.store.find(Smartgraphs.Question, 'q2');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment