Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 206
- Log:
Initial import of Gullery, an open source photo gallery:
http://nubyonrails.com/pages/gullery
- Author:
- rool
- Date:
- Sun May 20 19:05:59 +0100 2007
- Size:
- 714 Bytes
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | |
3 | class AssetTest < Test::Unit::TestCase |
4 | fixtures :assets, :projects |
5 | |
6 | def test_create_asset |
7 | assert create_asset.valid? |
8 | end |
9 | |
10 | def test_sizes |
11 | asset = Asset.find 1 |
12 | assert_equal 'closeup_normal.png', asset.web_path |
13 | assert_equal 'closeup_thumb.png', asset.web_path(:thumb) |
14 | assert_equal 'closeup_normal.png', asset.web_path(:normal) |
15 | assert_equal 'closeup.png', asset.web_path(:original) |
16 | end |
17 | |
18 | # def test_should_require_name |
19 | # p = create_project(:name => nil) |
20 | # assert p.errors.on(:name) |
21 | # end |
22 | |
23 | |
24 | protected |
25 | |
26 | def create_asset(options = {}) |
27 | Asset.create({ :path => 'image.jpg', :project_id => 1 }.merge(options)) |
28 | end |
29 | |
30 | end |