'Calling :func:`publish_docs` updates the routing rules for the
"clusterhq-staging-docs" bucket.'

def test_updated_routing_rules(self):

    aws = FakeAWS(routing_rules={}, s3_buckets={'clusterhq-staging-docs': {}})
    self.publish_docs(aws, '0.3.0+444.gf05215b', '0.3.1', environment=Environments.STAGING, routing_config={'prefix/': {'key/': {'replace_key': 'replace'}}})
    self.assertThat(aws.routing_rules['clusterhq-staging-docs'], MatchesRoutingRules([RoutingRule.when(key_prefix='prefix/key/').then_redirect(replace_key='prefix/replace', hostname='docs.staging.clusterhq.com', protocol='https', http_redirect_code='302')]))
