func TestLoad(t *testing.T) {

	// mock cheatpaths
	cheatpaths := []cheatpath.Cheatpath{
		{
			Name:     "community",
			Path:     path.Join(mock.Path("cheatsheets"), "community"),
			ReadOnly: true,
		},
		{
			Name:     "personal",
			Path:     path.Join(mock.Path("cheatsheets"), "personal"),
			ReadOnly: false,
		},
	}

	// load cheatsheets
	sheets, err := Load(cheatpaths)
	if err != nil {
		t.Errorf("failed to load cheatsheets: %v", err)
	}

	// assert that the correct number of sheets loaded
	// (sheet load details are tested in `sheet_test.go`)
	want := 4
	if len(sheets) != want {
		t.Errorf(
			"failed to load correct number of cheatsheets: want: %d, got: %d",
			want,
			len(sheets),
		)
	}
}
// TestLoad asserts that sheets on valid cheatpaths can be loaded successfully
TestLoad asserts that sheets on valid cheatpaths can be loaded successfully
// TestLoad asserts that sheets on valid cheatpaths can be loaded successfully
func TestLoad(t *testing.T) {
	cheatpaths := []cheatpath.Cheatpath{
		{
			Name:     "community",
			Path:     path.Join(mock.Path("cheatsheets"), "community"),
			ReadOnly: true,
		},
		{
			Name:     "personal",
			Path:     path.Join(mock.Path("cheatsheets"), "personal"),
			ReadOnly: false,
		},
	}
	sheets, err := Load(cheatpaths)
	if err != nil {
		t.Errorf("failed to load cheatsheets: %v", err)
	}
	want := 4
	if len(sheets) != want {
		t.Errorf(
			"failed to load correct number of cheatsheets: want: %d, got: %d",
			want,
			len(sheets),
		)
	}
}
func TestLoad ( t * testing . T ) { cheatpaths := [ ] cheatpath . Cheatpath { { Name : " " , Path : path . Join ( mock . Path ( " " ) , " " ) , ReadOnly : true , } , { Name : " " , Path : path . Join ( mock . Path ( " " ) , " " ) , ReadOnly : false , } , } sheets , err := Load ( cheatpaths ) if err != nil { t . Errorf ( " " , err ) } want := 4 if len ( sheets ) != want { t . Errorf ( " " , want , len ( sheets ) , ) } }
TestLoad asserts that sheets on valid cheatpaths can be loaded successfully
TestLoad asserts that sheets on valid cheatpaths can be loaded successfully
// mock cheatpaths // load cheatsheets // assert that the correct number of sheets loaded // (sheet load details are tested in `sheet_test.go`)