]> git.openstreetmap.org Git - rails.git/blob - test/system/account_pd_declaration_test.rb
9471c28c16af02cc3c36ee08a06bcdf536590b78
[rails.git] / test / system / account_pd_declaration_test.rb
1 require "application_system_test_case"
2
3 class AccountPdDeclarationTest < ApplicationSystemTestCase
4   def setup
5     @user = create(:user, :display_name => "test user")
6     sign_in_as(@user)
7   end
8
9   test "show checkbox if no declaration was made" do
10     visit account_pd_declaration_path
11
12     within_content_body do
13       assert_unchecked_field "I consider my contributions to be in the Public Domain"
14     end
15   end
16
17   test "show disabled checkbox if declaration was made" do
18     @user.update(:consider_pd => true)
19
20     visit account_pd_declaration_path
21
22     within_content_body do
23       assert_checked_field "I consider my contributions to be in the Public Domain", :disabled => true
24     end
25   end
26 end