2005-01-16 23:40:44 +01:00
|
|
|
#!/bin/env ruby
|
|
|
|
|
|
|
|
require File.dirname(__FILE__) + '/../test_helper'
|
2005-01-15 21:26:54 +01:00
|
|
|
require 'wiki_service'
|
|
|
|
|
|
|
|
class WikiServiceTest < Test::Unit::TestCase
|
|
|
|
def setup
|
|
|
|
@s = WikiServiceWithNoPersistence.new
|
|
|
|
@s.create_web 'Instiki', 'instiki'
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_read_write_page
|
|
|
|
@s.write_page 'instiki', 'FirstPage', "Electric shocks, I love 'em",
|
|
|
|
Time.now, 'DavidHeinemeierHansson'
|
|
|
|
assert_equal "Electric shocks, I love 'em", @s.read_page('instiki', 'FirstPage').content
|
|
|
|
end
|
|
|
|
end
|