blob: 2b9d92aafca2be1b8c7f322f6f2e2accd467fa14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
require_relative "setup.rb"
class FeatureRestTest < MiniTest::Test
# edit object metadata and compare
def test_metadata
# OpenTox::Feature
# create object, pass additional values
f = OpenTox::Feature.new
f.title = "first"
f.description = "first test description"
f.save
# get object to compare first
f2 = OpenTox::Feature.find f.id
assert_equal f.title, f2.title
assert_equal f.description, f2.description
# edit object and PUT back
f2.title = "second"
f2.description = f.description.reverse
f2.save
# get object to compare again
f3 = OpenTox::Feature.find f.id
refute_equal f.title, f3.title
refute_equal f.description, f3.description
end
# TODO edit object and compare rdf representation
end
|