blob: 4ddd2b8a4d3b07892e1cd3a6403104d69273500f [file] [log] [blame]
atoulmedbe670e2009-01-27 11:23:51 +00001<?php
2/*******************************************************************************
3 * Copyright (c) 2007-2009 Intalio, Inc.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Antoine Toulme, Intalio Inc.
11*******************************************************************************/
12
13define('BABEL_BASE_DIR', "../../");
14
15require("../spec_helper.php");
16require(BABEL_BASE_DIR . "classes/system/release_train.class.php");
17
18class DescribeReleaseTrainClass extends PHPSpec_Context {
19 public function before() {
20
21 }
22
23 public function itShouldSetATimeStampOnCreation() {
24 $rt = new ReleaseTrain("some_id");
25 $this->spec($rt->timestamp)->shouldNot->beNull();
26 }
27
28// TODO add a spec for the version of the release train
29
30 public function itShouldLoadAllTheReleaseTrains() {
31 $train_result = mysql_query("SELECT DISTINCT train_id FROM release_train_projects");
32 $all = ReleaseTrain::all();
33 $this->spec(count($all))->should->equal(mysql_num_rows($train_result));
34 }
35}
36?>