Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 1537 Bytes
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | |
3 | require 'dns_mock' |
4 | |
5 | class TrackbackTest < Test::Unit::TestCase |
6 | fixtures :contents, :feedback, :blacklist_patterns, :blogs |
7 | |
8 | def test_permalink_url |
9 | t = feedback(:trackback4) |
10 | assert_equal "http://myblog.net/articles/2004/04/01/second-blog-article#trackback-#{t.id}", t.permalink_url |
11 | end |
12 | |
13 | def test_edit_url |
14 | t = feedback(:trackback4) |
15 | assert_equal "http://myblog.net/admin/trackbacks/edit/#{t.id}", t.edit_url |
16 | end |
17 | |
18 | def test_delete_url |
19 | t = feedback(:trackback4) |
20 | assert_equal "http://myblog.net/admin/trackbacks/destroy/#{t.id}", t.delete_url |
21 | end |
22 | |
23 | def test_incomplete |
24 | tb = Trackback.new |
25 | tb.blog_name = "Blog name" |
26 | tb.title = "Title" |
27 | tb.excerpt = "Excerpt" |
28 | |
29 | assert ! tb.save |
30 | assert tb.errors.invalid?('url') |
31 | |
32 | tb.url = "http://foo.com" |
33 | assert tb.save |
34 | assert tb.errors.empty? |
35 | assert tb.guid.size > 15 |
36 | assert !tb.spam? |
37 | end |
38 | |
39 | def test_reject_spam_rbl |
40 | tb = Trackback.new do |tb| |
41 | tb.blog_name = "Spammer" |
42 | tb.title = "Spammy trackback" |
43 | tb.excerpt = %{This is just some random text. <a href="http://chinaaircatering.com">without any senses.</a>. Please disregard.} |
44 | tb.url = "http://buy-computer.us" |
45 | tb.ip = "212.42.230.206" |
46 | end |
47 | |
48 | assert tb.spam? |
49 | end |
50 | |
51 | def test_reject_spam_pattern |
52 | tb = Trackback.new do |tb| |
53 | tb.blog_name = "Another Spammer" |
54 | tb.title = "Spammy trackback" |
55 | tb.excerpt = "Texas hold-em poker crap" |
56 | end |
57 | assert tb.spam? |
58 | end |
59 | end |