Calendar is fullscreen

This commit is contained in:
2024-08-11 14:18:36 +02:00
parent 6d5509856f
commit e0d9d3a6b9
57 changed files with 431 additions and 362 deletions

View File

@@ -1,48 +0,0 @@
require "test_helper"
class PlacesControllerTest < ActionDispatch::IntegrationTest
setup do
@place = places(:one)
end
test "should get index" do
get places_url
assert_response :success
end
test "should get new" do
get new_place_url
assert_response :success
end
test "should create place" do
assert_difference("Place.count") do
post places_url, params: { place: { company_id: @place.company_id, name: @place.name } }
end
assert_redirected_to place_url(Place.last)
end
test "should show place" do
get place_url(@place)
assert_response :success
end
test "should get edit" do
get edit_place_url(@place)
assert_response :success
end
test "should update place" do
patch place_url(@place), params: { place: { company_id: @place.company_id, name: @place.name } }
assert_redirected_to place_url(@place)
end
test "should destroy place" do
assert_difference("Place.count", -1) do
delete place_url(@place)
end
assert_redirected_to places_url
end
end

View File

@@ -0,0 +1,48 @@
require "test_helper"
class TeamsControllerTest < ActionDispatch::IntegrationTest
setup do
@team = teams(:one)
end
test "should get index" do
get teams_url
assert_response :success
end
test "should get new" do
get new_team_url
assert_response :success
end
test "should create team" do
assert_difference("Team.count") do
post teams_url, params: { team: { } }
end
assert_redirected_to team_url(Team.last)
end
test "should show team" do
get team_url(@team)
assert_response :success
end
test "should get edit" do
get edit_team_url(@team)
assert_response :success
end
test "should update team" do
patch team_url(@team), params: { team: { } }
assert_redirected_to team_url(@team)
end
test "should destroy team" do
assert_difference("Team.count", -1) do
delete team_url(@team)
end
assert_redirected_to teams_url
end
end

View File

@@ -1,9 +0,0 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
name: MyString
company: one
two:
name: MyString
company: two

11
test/fixtures/teams.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# This model initially had no columns defined. If you add columns to the
# model remove the "{}" from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value

View File

@@ -1,6 +1,6 @@
require "test_helper"
class PlaceTest < ActiveSupport::TestCase
class TeamTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end

View File

@@ -1,43 +0,0 @@
require "application_system_test_case"
class PlacesTest < ApplicationSystemTestCase
setup do
@place = places(:one)
end
test "visiting the index" do
visit places_url
assert_selector "h1", text: "Places"
end
test "should create place" do
visit places_url
click_on "New place"
fill_in "Company", with: @place.company_id
fill_in "Name", with: @place.name
click_on "Create Place"
assert_text "Place was successfully created"
click_on "Back"
end
test "should update Place" do
visit place_url(@place)
click_on "Edit this place", match: :first
fill_in "Company", with: @place.company_id
fill_in "Name", with: @place.name
click_on "Update Place"
assert_text "Place was successfully updated"
click_on "Back"
end
test "should destroy Place" do
visit place_url(@place)
click_on "Destroy this place", match: :first
assert_text "Place was successfully destroyed"
end
end

39
test/system/teams_test.rb Normal file
View File

@@ -0,0 +1,39 @@
require "application_system_test_case"
class TeamsTest < ApplicationSystemTestCase
setup do
@team = teams(:one)
end
test "visiting the index" do
visit teams_url
assert_selector "h1", text: "Teams"
end
test "should create team" do
visit teams_url
click_on "New team"
click_on "Create Team"
assert_text "Team was successfully created"
click_on "Back"
end
test "should update Team" do
visit team_url(@team)
click_on "Edit this team", match: :first
click_on "Update Team"
assert_text "Team was successfully updated"
click_on "Back"
end
test "should destroy Team" do
visit team_url(@team)
click_on "Destroy this team", match: :first
assert_text "Team was successfully destroyed"
end
end