         exampleName: ''
     )
     assert.equal(name, 'a > b')
-
-  it 'does not mind if any part of the origin object already contains the separator', ->
+  )
+  it('returns no separators if the origin object contains just one part', ->
+    name = getTransactionName(
+      origin:
+        apiName: null
+        resourceGroupName: 'a'
+        resourceName: undefined
+        actionName: ''
+        exampleName: ''
+    )
+    assert.equal(name, 'a')
+  )
+  it('does not mind if any part of the origin object already contains the separator', ->
     name = getTransactionName(
       origin:
         apiName: 'a'

        exampleName: 'e'
    )
    assert.equal(name, 'a > b > c > d > e')

  it 'joins just the parts of the origin object, which are available', ->
    name = getTransactionName(
      origin:
        apiName: null

{assert} = require('chai')

getTransactionName = require('../../../src/transaction-name/get-transaction-name')


describe('getTransactionName', ->
  it('is a function', ->
    assert.isFunction(getTransactionName)
  )
  it('joins all parts of the origin object', ->
    name = getTransactionName(
      origin:
        apiName: 'a'
