Newer
Older
postorius / src / mailmanweb / tests / test_to_check.txt
Change the User Settings #TODO → LP:820827
========================

Now let's check out the user settings. Start by accessing the user 
settings page. The user settings also requires the user to be logged 
in. We'll call the page and log in as the Katie.

    >>> response = c.post('/user_settings/katie%40example.com/',
    ...                   {"addr": "katie@example.com",
    ...                   "psw": "katie"})

Let's check that we ended up on the right page.

    >>> print "User Settings" in response.content
    True

The settings page contains two tabs - one for the general user settings
valid for all lists and a specific membership page with links to all 
lists the user is subscribed to. On the latter the user can change the 
settings for each list.
We'll start by changing some of the user settings. We'll set the real 
name to Katie and the default email address to 'jack@example.com'.

    >>> response = c.post('/user_settings/katie%40example.com/', 
    ...                   {'real_name': 'Katie', 
    ...                   'address': u'jack@example.com'})

If we now check the content of the page that was loaded, we should get
a confirmation that everything went well.

    >>> print "The user settings have been updated." in response.content
    True


#MEMBERSHIP SETTINGS part2 #TODO - → LP:820827
We want to make sure we don't hide our address when posting to the 
list, so we change this option and save the form.

    >>> response = c.post('/membership_settings/katie%40example.com/?list=test-one@example.com', 
    ...                   {"hide_address": False})

Now we just need to make sure the saving went well. We do this by 
checking the content of the page that was loaded.

    >>> print "The membership settings have been updated." in response.content
    True

We feel done with the user and memebership settings so let's log out 
before we continue.

    >>> response = c.get('/lists/logout/',)

Again, if the request was successful we should end up on the list info
page. Make sure that we got redirected there.

    >>> print "All mailing lists" in response.content
    True
"""