first commit, largely copied volunteers
This commit is contained in:
0
test/system/.keep
Normal file
0
test/system/.keep
Normal file
43
test/system/members_test.rb
Normal file
43
test/system/members_test.rb
Normal file
@ -0,0 +1,43 @@
|
||||
require "application_system_test_case"
|
||||
|
||||
class MembersTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@member = members(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit members_url
|
||||
assert_selector "h1", text: "Members"
|
||||
end
|
||||
|
||||
test "should create member" do
|
||||
visit members_url
|
||||
click_on "New member"
|
||||
|
||||
fill_in "Name", with: @member.name
|
||||
check "Public" if @member.public
|
||||
click_on "Create Member"
|
||||
|
||||
assert_text "Member was successfully created"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should update Member" do
|
||||
visit member_url(@member)
|
||||
click_on "Edit this member", match: :first
|
||||
|
||||
fill_in "Name", with: @member.name
|
||||
check "Public" if @member.public
|
||||
click_on "Update Member"
|
||||
|
||||
assert_text "Member was successfully updated"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should destroy Member" do
|
||||
visit member_url(@member)
|
||||
click_on "Destroy this member", match: :first
|
||||
|
||||
assert_text "Member was successfully destroyed"
|
||||
end
|
||||
end
|
45
test/system/pictures_test.rb
Normal file
45
test/system/pictures_test.rb
Normal file
@ -0,0 +1,45 @@
|
||||
require "application_system_test_case"
|
||||
|
||||
class PicturesTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@picture = pictures(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit pictures_url
|
||||
assert_selector "h1", text: "Pictures"
|
||||
end
|
||||
|
||||
test "should create picture" do
|
||||
visit pictures_url
|
||||
click_on "New picture"
|
||||
|
||||
fill_in "Member", with: @picture.member_id
|
||||
fill_in "Picture", with: @picture.picture
|
||||
fill_in "Text", with: @picture.text
|
||||
click_on "Create Picture"
|
||||
|
||||
assert_text "Picture was successfully created"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should update Picture" do
|
||||
visit picture_url(@picture)
|
||||
click_on "Edit this picture", match: :first
|
||||
|
||||
fill_in "Member", with: @picture.member_id
|
||||
fill_in "Picture", with: @picture.picture
|
||||
fill_in "Text", with: @picture.text
|
||||
click_on "Update Picture"
|
||||
|
||||
assert_text "Picture was successfully updated"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should destroy Picture" do
|
||||
visit picture_url(@picture)
|
||||
click_on "Destroy this picture", match: :first
|
||||
|
||||
assert_text "Picture was successfully destroyed"
|
||||
end
|
||||
end
|
47
test/system/stories_test.rb
Normal file
47
test/system/stories_test.rb
Normal file
@ -0,0 +1,47 @@
|
||||
require "application_system_test_case"
|
||||
|
||||
class StoriesTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@story = stories(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit stories_url
|
||||
assert_selector "h1", text: "Stories"
|
||||
end
|
||||
|
||||
test "should create story" do
|
||||
visit stories_url
|
||||
click_on "New story"
|
||||
|
||||
fill_in "Happened", with: @story.happened
|
||||
fill_in "Header", with: @story.header
|
||||
fill_in "Picture", with: @story.picture
|
||||
fill_in "Text", with: @story.text
|
||||
click_on "Create Story"
|
||||
|
||||
assert_text "Story was successfully created"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should update Story" do
|
||||
visit story_url(@story)
|
||||
click_on "Edit this story", match: :first
|
||||
|
||||
fill_in "Happened", with: @story.happened
|
||||
fill_in "Header", with: @story.header
|
||||
fill_in "Picture", with: @story.picture
|
||||
fill_in "Text", with: @story.text
|
||||
click_on "Update Story"
|
||||
|
||||
assert_text "Story was successfully updated"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should destroy Story" do
|
||||
visit story_url(@story)
|
||||
click_on "Destroy this story", match: :first
|
||||
|
||||
assert_text "Story was successfully destroyed"
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user