<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,15 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+contact:
+  body: mrchucho at mrchucho dot net
+  title: contact
+  attachment: &quot;&quot;
 
-one:
-  title: MyString
-  body: MyText
-  attachment: false
+projects:
+  body: &quot;&quot;
+  title: projects
+  attachment: projects.html.erb
+
+about:
+  body: &quot;This is about mrchucho&quot;
+  title: about
+  attachment: &quot;&quot;
 
-two:
-  title: MyString
-  body: MyText
-  attachment: false</diff>
      <filename>test/fixtures/pages.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,40 @@
 require File.dirname(__FILE__) + '/../test_helper'
 
 class PageTest &lt; ActiveSupport::TestCase
-  # Replace this with your real tests.
-  def test_truth
-    assert true
+  def test_my_pages
+    pages = Page.displayed_in_layout
+    assert_equal 3, pages.size
+    assert pages.detect{|page| page.title.downcase.eql?(&quot;about&quot;)}
+    assert pages.detect{|page| page.title.downcase.eql?(&quot;contact&quot;)}
+    assert pages.detect{|page| page.title.downcase.eql?(&quot;projects&quot;)}
+  end
+
+  def test_not_found_exception
+    begin
+      Page.find_by_title(&quot;not-a-real-page&quot;)
+    rescue =&gt; e
+      assert_instance_of ActiveRecord::RecordNotFound, e
+      assert_equal &quot;No such page.&quot;, e.message
+    end
+  end
+
+  def test_content_attachment
+    page = pages(:projects)
+
+    assert page.has_attachment?
+    assert_equal({:file =&gt; &quot;/pages/#{page.attachment}&quot;}, page.content)
+  end
+
+  def test_content_no_attachment
+    page = pages(:about)
+
+    assert !page.has_attachment?
+    assert_equal({:inline =&gt; page.body}, page.content)
+  end
+
+  def test_permalink
+    page = pages(:about)
+
+    assert_equal({:id =&gt; page.title.downcase}, page.permalink)
   end
 end</diff>
      <filename>test/unit/page_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>30331424d9beb381e6ab22e904a30aeb077435c7</id>
    </parent>
  </parents>
  <author>
    <name>mrchucho</name>
    <email>mrchucho@mrchucho.net</email>
  </author>
  <url>http://github.com/mrchucho/bbot/commit/d7de3d7c26c44032b01dffde79e2b912b62657f5</url>
  <id>d7de3d7c26c44032b01dffde79e2b912b62657f5</id>
  <committed-date>2009-10-09T09:13:30-07:00</committed-date>
  <authored-date>2009-10-09T09:13:30-07:00</authored-date>
  <message>Page: replacing custom finders with named_scope. Added/Updated Unit Tests.</message>
  <tree>abe45fb1f8f978325be39fc21958c65b444b920e</tree>
  <committer>
    <name>mrchucho</name>
    <email>mrchucho@mrchucho.net</email>
  </committer>
</commit>
