package com.atlassian.bitbucket.mesh.git.ref;

import org.junit.Test;

import static org.junit.Assert.*;

public class RefTest {

    @Test
    public void testIsDark() {
        assertTrue(Ref.isDark("stash-refs/pull-requests/0/from"));
        assertTrue(Ref.isDark("stash-refs/something"));
        assertTrue(Ref.isDark("stash-refs2/heads/master"));
        assertTrue(Ref.isDark("dark-refs/pull-requests/0/from"));
        assertTrue(Ref.isDark("dark-refs/something"));
        assertFalse(Ref.isDark("HEAD"));
        assertFalse(Ref.isDark("refs/heads/master"));
        assertFalse(Ref.isDark("refs/pull-requests/0/from"));
        assertFalse(Ref.isDark("refs/tags/this-is-a-tag"));
        assertFalse(Ref.isDark("refs/remotes/origin/master"));
    }
}