3 class ProjectsControllerTest < ActionController::TestCase
4 test "inactive user is asked to sign user agreements on front page" do
5 get :index, {}, session_for(:inactive)
6 assert_response :success
7 assert_not_empty assigns(:required_user_agreements),
8 "Inactive user did not have required_user_agreements"
9 assert_template 'user_agreements/index',
10 "Inactive user was not presented with a user agreement at the front page"
13 test "sharing a project with a user and group" do
14 uuid_list = [api_fixture("groups")["future_project_viewing_group"]["uuid"],
15 api_fixture("users")["future_project_user"]["uuid"]]
17 id: api_fixture("groups")["asubproject"]["uuid"],
21 assert_response :success
22 json_response = Oj.load(@response.body)
23 assert_equal(uuid_list, json_response["success"])
26 test "user with project read permission can't add permissions" do
28 id: api_fixture("groups")["aproject"]["uuid"],
29 uuids: [api_fixture("users")["spectator"]["uuid"]],
31 session_for(:project_viewer))