src/test/java/com/jcabi/github/RtDeployKeysITCase.java
/**
     * RtDeployKeys can remove a deploy key.
     * @throws Exception If something goes wrong
     */
RtDeployKeys can remove a deploy key.
@throws Exception If something goes wrong
RtDeployKeys can remove a deploy key . @throws Exception If something goes wrong
@Test
    public void removesDeployKey() throws Exception {
        final DeployKeys keys = repo.keys();
        final String title = "Test Remove Key";
        final DeployKey key = keys.create(title, key());
        try {
            MatcherAssert.assertThat(
                keys.get(key.number()),
                Matchers.notNullValue()
            );
        } finally {
            key.remove();
        }
        MatcherAssert.assertThat(
            keys.iterate(),
            Matchers.not(Matchers.contains(key))
        );
    }
@ Test public void removesDeployKey ( ) throws Exception { final DeployKeys keys = repo . keys ( ) ; final String title = "Test Remove Key" ; final DeployKey key = keys . create ( title , key ( ) ) ; try { MatcherAssert . assertThat ( keys . get ( key . number ( ) ) , Matchers . notNullValue ( ) ) ; } finally { key . remove ( ) ; } MatcherAssert . assertThat ( keys . iterate ( ) , Matchers . not ( Matchers . contains ( key ) ) ) ; }
RtDeployKeys can remove a deploy key.
RtDeployKeys can remove a deploy key .